diff options
Diffstat (limited to 'src/client/documents/DocUtils.ts')
-rw-r--r-- | src/client/documents/DocUtils.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/documents/DocUtils.ts b/src/client/documents/DocUtils.ts index 3a0167cb6..acaefe783 100644 --- a/src/client/documents/DocUtils.ts +++ b/src/client/documents/DocUtils.ts @@ -34,6 +34,8 @@ import { OpenWhere } from '../views/nodes/OpenWhere'; import { TaskCompletionBox } from '../views/nodes/TaskCompletedBox'; import { DocumentType } from './DocumentTypes'; import { Docs, DocumentOptions } from './Documents'; +import { DocumentView } from '../views/nodes/DocumentView'; +import { CollectionFreeFormView } from '../views/collections/collectionFreeForm'; export namespace DocUtils { function matchFieldValue(doc: Doc, key: string, valueIn: unknown): boolean { @@ -376,6 +378,11 @@ export namespace DocUtils { }, StrCast(dragDoc.title)), icon: Doc.toIcon(dragDoc), })) as ContextMenuProps[]; + documentList.push({ + description: ':Smart Drawing', + event: e => (DocumentView.Selected().lastElement().ComponentView as CollectionFreeFormView)?.showSmartDraw(e?.x || 0, e?.y || 0), + icon: 'file', + }); ContextMenu.Instance.addItem({ description: 'Create document', subitems: documentList, |