HexagonJS
Edit Page
Pointer Events
A module for adding pointer events to the selection api. The pointer events normalize touch and mouse events into a common api.
Examples
hx.select('#body').on('pointerdown', function(event){
  // do something on mousedown/touchstart
});
hx.select('#body').on('pointerup', function(event){
  // do something on mouseup/touchend/touchcancel
});
hx.select('#body').on('pointermove', function(event){
  // do something on mousemove/touchmove
});
hx.select('#body').on('pointerleave', function(event){
  // do something on mouseleave/touchleave
});
hx.select('#body').on('pointerenter', function(event){
  // do something on mouseenter/touchenter
});
Api
Prototypes
Selection
The pointer events extend selection events using the 'on' method
Events
pointerdown
Emitted on mousedown/touchstart events.
pointerenter
Emitted on mouseenter/touchenter events.
pointerleave
Emitted on mouseleave/touchleave events.
pointermove
Emitted on mousemove/touchmove events.
pointerup
Emitted on mouseup/touchend/touchcancel events.