fix selection rect not working at all
This commit is contained in:
@@ -43,9 +43,8 @@ function onDocumentPointerUp(e: MouseEvent) {
|
||||
return;
|
||||
}
|
||||
|
||||
rect.disable();
|
||||
|
||||
if (warrenStore.current == null || warrenStore.current.dir == null) {
|
||||
if (!rect.isMinSize()) {
|
||||
warrenStore.clearSelection();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -53,14 +52,14 @@ function onDocumentPointerUp(e: MouseEvent) {
|
||||
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);
|
||||
|
||||
if (!rect.isMinSize()) {
|
||||
warrenStore.clearSelection();
|
||||
rect.disable();
|
||||
|
||||
if (warrenStore.current == null || warrenStore.current.dir == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const selectionRect = new DOMRect(left, top, width, height);
|
||||
|
||||
const entryElements = document.querySelectorAll('[data-entry-index]');
|
||||
|
||||
const targetEntries = [];
|
||||
|
||||
Reference in New Issue
Block a user