commit 627cb35fb302523b5cdb8b662db6b5c70b907982
parent 00e973862c8e83b6f09f567e80b0917774693b9d
Author: Hunter
Date: Sun, 19 Oct 2025 21:58:46 -0400
lock cursor on drag start
Diffstat:
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
@@ -66,7 +66,7 @@
outline: 2px solid transparent;
outline-offset: -2px;
transition: outline-color 0.2s;
- background: #fafaf8;
+ background: #fafaf8;
}
.image-container:hover {
@@ -82,7 +82,8 @@
outline-color: #4a90e2;
}
- body.resizing * {
+ body.resizing *,
+ body.dragging * {
cursor: inherit !important;
}
@@ -375,6 +376,10 @@
return;
}
+ // Lock cursor to move during drag operation
+ document.body.style.cursor = 'move';
+ document.body.classList.add('dragging');
+
dragState = {
image: imageData,
startX: e.clientX,
@@ -481,6 +486,9 @@
if (dragState) {
dragState.image.container.classList.remove('dragging');
dragState = null;
+ // Restore the default cursor
+ document.body.style.cursor = '';
+ document.body.classList.remove('dragging');
}
if (resizeState) {
resizeState.image.container.classList.remove('resizing');