mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
use transform safe offsetX instead of clientX
This commit is contained in:
parent
b0c6dc5fb1
commit
22efc603d8
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user