This commit is contained in:
th committed 2026-04-11 01:28:49 +02:00
1 parent 262b853c5b
commit 3ae84ccdd7
2 files changed
+12 -1

No files matched your search

+4 -1
View File
@@ -424,6 +424,10 @@ function onEdMouseDown(e) {
e.preventDefault();
edSelected = -1;
updateEdDeleteBtn();
// Re-render existing rects first so the prior selection clears visually —
// doing this AFTER creating the draft would wipe it since renderEdRects
// replaces ed.layer.innerHTML.
renderEdRects();
const p = edLayerPct(e);
const draft = document.createElement('div');
draft.className = 'ed-rect-draft';
@@ -433,7 +437,6 @@ function onEdMouseDown(e) {
draft.style.height = '0%';
ed.layer.appendChild(draft);
edDrag = { mode: 'create', startX: p.x, startY: p.y, draft };
renderEdRects();
}
function onEdMouseMove(e) {