Skip to content

Commit

Permalink
use transform safe offsetX instead of clientX
Browse files Browse the repository at this point in the history
  • Loading branch information
benbenbenbenbenben authored Mar 19, 2017
1 parent b0c6dc5 commit 22efc60
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Stage.js
Original file line number Diff line number Diff line change
Expand Up @@ -705,13 +705,13 @@
if (evt.touches.length > 0) {
var touch = evt.touches[0];
// get the information for finger #1
x = touch.clientX - contentPosition.left;
y = touch.clientY - contentPosition.top;
x = touch.offsetX;
y = touch.offsetY;
}
} else {
// mouse events
x = evt.clientX - contentPosition.left;
y = evt.clientY - contentPosition.top;
x = evt.offsetX;
y = evt.offsetY;
}
if (x !== null && y !== null) {
this.pointerPos = {
Expand Down

0 comments on commit 22efc60

Please sign in to comment.