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