diff options
| author | bobzel <zzzman@gmail.com> | 2024-08-29 23:38:12 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-08-29 23:38:12 -0400 |
| commit | d1fad65d5f3bfb2ed7d2b94af2c3c609a2090545 (patch) | |
| tree | b5b6d1354f74c9399971235e8c766abb13b1b3c6 /src/client/views/collections/collectionFreeForm | |
| parent | 4c3a0e041486e6c04b7b35e898bf7d99ae5bb43b (diff) | |
made smartDraw autoFocus and be available from : menu
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 76549a423..880d1cd74 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -510,7 +510,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection e.stopPropagation(); break; case InkTool.SmartDraw: - setupMoveUpEvents(this, e, this.onPointerMove, emptyFunction, this.showSmartDraw, hit !== -1); + setupMoveUpEvents(this, e, this.onPointerMove, emptyFunction, e => this.showSmartDraw(e.pageX, e.pageY), hit !== -1); e.stopPropagation(); case InkTool.None: if (!(this._props.layoutEngine?.() || StrCast(this.layoutDoc._layoutEngine))) { @@ -1229,11 +1229,11 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection }; @action - showSmartDraw = (e: PointerEvent) => { + showSmartDraw = (x: number, y: number) => { SmartDrawHandler.Instance.CreateDrawingDoc = this.createDrawingDoc; SmartDrawHandler.Instance.RemoveDrawing = this.removeDrawing; SmartDrawHandler.Instance.AddDrawing = this.addDrawing; - SmartDrawHandler.Instance.displaySmartDrawHandler(e.pageX, e.pageY); + SmartDrawHandler.Instance.displaySmartDrawHandler(x, y); }; _drawing: Doc[] = []; |
