first commit
This commit is contained in:
commit
eb2f504652
32490 changed files with 5731109 additions and 0 deletions
27
node_modules/wheel/index.js
generated
vendored
Normal file
27
node_modules/wheel/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/**
|
||||
* This module used to unify mouse wheel behavior between different browsers in 2014
|
||||
* Now it's just a wrapper around addEventListener('wheel');
|
||||
*
|
||||
* Usage:
|
||||
* var addWheelListener = require('wheel').addWheelListener;
|
||||
* var removeWheelListener = require('wheel').removeWheelListener;
|
||||
* addWheelListener(domElement, function (e) {
|
||||
* // mouse wheel event
|
||||
* });
|
||||
* removeWheelListener(domElement, function);
|
||||
*/
|
||||
|
||||
module.exports = addWheelListener;
|
||||
|
||||
// But also expose "advanced" api with unsubscribe:
|
||||
module.exports.addWheelListener = addWheelListener;
|
||||
module.exports.removeWheelListener = removeWheelListener;
|
||||
|
||||
|
||||
function addWheelListener(element, listener, useCapture) {
|
||||
element.addEventListener('wheel', listener, useCapture);
|
||||
}
|
||||
|
||||
function removeWheelListener( element, listener, useCapture ) {
|
||||
element.removeEventListener('wheel', listener, useCapture);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue