fix grabbing and moving
This commit is contained in:
@@ -80,8 +80,10 @@ document.body.addEventListener("mousemove", () => {
|
||||
for (var i = 0; i < handleBeingHeld.length; i++) {
|
||||
if (!handleBeingHeld[i]) continue;
|
||||
|
||||
newX = startX - currentX;
|
||||
newY = currentY - startY;
|
||||
newX = Math.abs(startX - currentX);
|
||||
newY = Math.abs(currentY - startY);
|
||||
|
||||
console.log(newX, newY);
|
||||
|
||||
moveAmount = max(min(newX, newY), 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user