diff --git a/frontend/components/SelectionRect.vue b/frontend/components/SelectionRect.vue index b1517bb..8765f96 100644 --- a/frontend/components/SelectionRect.vue +++ b/frontend/components/SelectionRect.vue @@ -43,23 +43,25 @@ function onDocumentPointerUp(e: MouseEvent) { return; } - if (!rect.isMinSize()) { - warrenStore.clearSelection(); - return; - } - const left = Math.min(rect.a.x, rect.b.x); const top = Math.min(rect.a.y, rect.b.y); const width = Math.abs(rect.a.x - rect.b.x); const height = Math.abs(rect.a.y - rect.b.y); const selectionRect = new DOMRect(left, top, width, height); + const isMinSize = rect.isMinSize(); + rect.disable(); if (warrenStore.current == null || warrenStore.current.dir == null) { return; } + if (!isMinSize) { + warrenStore.clearSelection(); + return; + } + const entryElements = document.querySelectorAll('[data-entry-index]'); const targetEntries = [];