diff options
author | bobzel <zzzman@gmail.com> | 2024-10-01 19:40:50 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-10-01 19:40:50 -0400 |
commit | e29b76c89532aefaa27c9950981f6405ac3899d9 (patch) | |
tree | 7cb437ca67c81e4e0a610dfadcfe632ed6974d70 /src/client/documents/DocUtils.ts | |
parent | 92d13a93ec871f3f3048b7344528e618845ad76f (diff) | |
parent | 45edcb10855ba5a5313ccf2e60c5ba3590d7bcbc (diff) |
Merge branch 'master' into alyssa-starter
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, |