From 1aaf6825bd15115a0c2687d188be5ff7c238485e Mon Sep 17 00:00:00 2001 From: Gregory Wells Date: Tue, 23 Jun 2026 11:41:26 -0400 Subject: [PATCH] reset position on mouse up --- static/javascript/resize_photo_dialouge.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/javascript/resize_photo_dialouge.js b/static/javascript/resize_photo_dialouge.js index b103565..a730fc3 100644 --- a/static/javascript/resize_photo_dialouge.js +++ b/static/javascript/resize_photo_dialouge.js @@ -70,6 +70,8 @@ for (var i = 0; i < resize_anchors.length; i++) { document.body.addEventListener("mouseup", () => { handleBeingHeld[index] = false; + resize_anchors[index].style.setProperty("--x-offset", "0px"); + resize_anchors[index].style.setProperty("--y-offset", "0px"); }); resize_anchors[i].style.setProperty("--x-offset", "0px"); @@ -83,8 +85,6 @@ document.body.addEventListener("mousemove", () => { newX = Math.abs(startX - currentX); newY = Math.abs(currentY - startY); - console.log(newX, newY); - moveAmount = max(min(newX, newY), 0); resize_anchors[i].style.setProperty("--x-offset", moveAmount + "px");