commit 4e08f37c9ea79e49444a99eed457045529afffa6
parent 3b311193a7d3ab2d5ca52f36a86289186649852a
Author: Hunter
Date: Thu, 16 Oct 2025 12:08:51 -0400
shift + click to delete image
Diffstat:
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
@@ -303,11 +303,22 @@
function setupImageHandlers(imageData) {
const container = imageData.container;
- // Moving
+ // Moving / Deleting
container.addEventListener('mousedown', (e) => {
if (e.target.classList.contains('resize-handle')) return;
e.preventDefault();
+
+ // Shift-click to delete
+ if (e.shiftKey) {
+ const index = images.indexOf(imageData);
+ if (index > -1) {
+ images.splice(index, 1);
+ }
+ container.remove();
+ return;
+ }
+
dragState = {
image: imageData,
startX: e.clientX,