mirror of
https://github.com/Pomax/BezierInfo-2.git
synced 2025-09-28 00:59:00 +02:00
fricking debugging man
This commit is contained in:
@@ -92,17 +92,23 @@ class BaseAPI {
|
||||
getCursorCoords(evt) {
|
||||
const left = evt.target.offsetLeft,
|
||||
top = evt.target.offsetTop;
|
||||
|
||||
let x, y;
|
||||
|
||||
if (evt.targetTouches) {
|
||||
const touch = evt.targetTouches;
|
||||
for (let i=0; i<touch.length; i++) {
|
||||
console.log(touch[i]);
|
||||
if (!touch[i] || !touch[i].pageX) continue;
|
||||
this.cursor.x = touch[i].pageX - left;
|
||||
this.cursor.y = touch[i].pageY - top;
|
||||
x = touch[i].pageX - left;
|
||||
y = touch[i].pageY - top;
|
||||
}
|
||||
} else {
|
||||
this.cursor.x = evt.pageX - left;
|
||||
this.cursor.y = evt.pageY - top;
|
||||
x = evt.pageX - left;
|
||||
y = evt.pageY - top;
|
||||
}
|
||||
this.cursor.x = x;
|
||||
this.cursor.y = y;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user