diff --git a/package-lock.json b/package-lock.json index dd978bc..a4149a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-input-position", - "version": "1.3.1", + "version": "1.3.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7806612..2404a1f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-input-position", - "version": "1.3.2", + "version": "1.3.3", "description": "A React component that decorates it's children with mouse/touch position tracking, a status toggle fired by click/gesture events, and more.", "keywords": [ "touch", diff --git a/src/mouseActivation/click.js b/src/mouseActivation/click.js index a5cf587..a4aa2de 100644 --- a/src/mouseActivation/click.js +++ b/src/mouseActivation/click.js @@ -35,10 +35,16 @@ function mouseLeave() { this.mouseDown = false; } +function wheel(e) { + const position = { x: e.clientX, y: e.clientY }; + this.setPosition(position); +} + export default { mouseDown, mouseUp, mouseMove, mouseLeave, + wheel, dragStart: utils.preventDefault }; diff --git a/src/mouseActivation/doubleClick.js b/src/mouseActivation/doubleClick.js index 8e87c0a..06800fe 100644 --- a/src/mouseActivation/doubleClick.js +++ b/src/mouseActivation/doubleClick.js @@ -28,11 +28,17 @@ function mouseLeave() { this.mouseDown = false; } +function wheel(e) { + const position = { x: e.clientX, y: e.clientY }; + this.setPosition(position); +} + export default { mouseDown, mouseUp, dblClick, mouseMove, mouseLeave, + wheel, dragStart: utils.preventDefault }; diff --git a/src/mouseActivation/hover.js b/src/mouseActivation/hover.js index d3c236c..b43de00 100644 --- a/src/mouseActivation/hover.js +++ b/src/mouseActivation/hover.js @@ -28,11 +28,17 @@ function mouseLeave() { this.mouseDown = false; } +function wheel(e) { + const position = { x: e.clientX, y: e.clientY }; + this.setPosition(position); +} + export default { mouseDown, mouseUp, mouseMove, mouseEnter, mouseLeave, + wheel, dragStart: utils.preventDefault }; diff --git a/src/mouseActivation/mouseDown.js b/src/mouseActivation/mouseDown.js index 9774441..a0d7fe6 100644 --- a/src/mouseActivation/mouseDown.js +++ b/src/mouseActivation/mouseDown.js @@ -55,11 +55,17 @@ function addRemoveOutsideHandlers(add) { }); } +function wheel(e) { + const position = { x: e.clientX, y: e.clientY }; + this.setPosition(position); +} + export default { mouseDown, mouseUp, mouseMove, mouseLeave, mouseEnter, + wheel, dragStart: utils.preventDefault };