aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-11-14 10:48:16 -0500
committerbobzel <zzzman@gmail.com>2024-11-14 10:48:16 -0500
commit196b92cb84095780d2b36244831cac03e9b66d8e (patch)
treefb540f5b8e79e6044c4c8fde36360a64084d2c4b /src/client/views/collections/collectionFreeForm
parentca101a6b1899bdeceef8f46a4228d90e43207593 (diff)
changed isScribble related code to be more robust at determine cusps and deciding if cusps amount to a scribble. enabled undo of scribble erase without undoing scribble. added cusp visualizer for debugging, and cleaned up downDocView to be downFfview on CollectionFreeformView.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 3de97f836..49b432d7c 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -98,6 +98,11 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
const parent = CollectionFreeFormDocumentView.from(dv)?._props.reactParent;
return parent instanceof CollectionFreeFormView ? parent : undefined;
}
+ /**
+ * The Freeformview below the cursor at the start of a gesture (that receives the pointerDown event). Used by GestureOverlay to determine the doc a gesture should apply to.
+ */
+ // eslint-disable-next-line no-use-before-define
+ public static DownFfview: CollectionFreeFormView | undefined; // the first DocView that receives a pointerdown event. used by GestureOverlay to determine the doc a gesture should apply to.
private _clusters = new CollectionFreeFormClusters(this);
private _oldWheel: HTMLDivElement | null = null;
@@ -497,6 +502,8 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
@action
onPointerDown = (e: React.PointerEvent): void => {
+ if (!CollectionFreeFormView.DownFfview) CollectionFreeFormView.DownFfview = this;
+
this._downX = this._lastX = e.pageX;
this._downY = this._lastY = e.pageY;
this._downTime = Date.now();