Unipointer
Base class for doing one thing with pointer event
Used with Unidragger and TapListener
Install
Bower: bower install unipointer
npm: npm install unipointer
Usage
function PointerFun( elem ) {
this.element = elem;
this._bindStartEvent( this.element, true );
}
PointerFun.prototype = new Unipointer();
PointerFun.prototype.pointerDown = function( event, pointer ) {
console.log('pointer down');
};
PointerFun.prototype.pointerMove = function( event, pointer ) {
console.log('pointer move');
};
PointerFun.prototype.pointerUp = function( event, pointer ) {
console.log('pointer up');
};
PointerFun.prototype.pointerCancel = function( event, pointer ) {
console.log('pointer cancel');
};
PointerFun.prototype.pointerDone = function( event, pointer ) {
console.log('pointer done');
};
MIT license
By Metafizzy