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++) {
|
for (var i = 0; i < handleBeingHeld.length; i++) {
|
||||||
if (!handleBeingHeld[i]) continue;
|
if (!handleBeingHeld[i]) continue;
|
||||||
|
|
||||||
newX = startX - currentX;
|
newX = Math.abs(startX - currentX);
|
||||||
newY = currentY - startY;
|
newY = Math.abs(currentY - startY);
|
||||||
|
|
||||||
|
console.log(newX, newY);
|
||||||
|
|
||||||
moveAmount = max(min(newX, newY), 0);
|
moveAmount = max(min(newX, newY), 0);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user