From 164acc34eb3a03fd92da28d05a6fe7d3573b2197 Mon Sep 17 00:00:00 2001 From: Orion Reed Date: Wed, 11 Dec 2024 01:50:25 -0500 Subject: [PATCH] remove silly llm comments --- demo/moveBefore.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/demo/moveBefore.html b/demo/moveBefore.html index 37fcf67..6ee8a0a 100644 --- a/demo/moveBefore.html +++ b/demo/moveBefore.html @@ -70,14 +70,15 @@ console.warn('Note: moveBefore() API requires Chrome Canary with chrome://flags/#atomic-move enabled'); } - let isMoving = false; // Flag to prevent recursive moves + // TODO: investigate / figure out how to avoid the need for this + let isMoving = false; document.addEventListener('transform', (e) => { if (isMoving) return; // Prevent recursive calls const shape = e.target; if (!shape.moveBefore) { - return; // Exit if moveBefore is not supported + return; } const rect = shape.getBoundingClientRect(); @@ -94,12 +95,11 @@ } } - // If not in any container, move to body if (shape.parentElement !== document.body) { document.body.moveBefore(shape, document.body.firstChild); } } finally { - isMoving = false; // Ensure flag is reset even if there's an error + isMoving = false; } });