diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-09-06 09:18:11 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-09-06 09:18:11 -0400 |
| commit | 95f773b56b8ed4fa95b1fd308c19baee1744275a (patch) | |
| tree | 7ca0046e292e8a7b48bbde1474e9c76888234bf4 /src/client/views/collections/collectionFreeForm | |
| parent | 760465b0723e2b21a07269afe61a0207a0bc5580 (diff) | |
added note types. fixed user_mark
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index a7acd9e91..aadb7f6e9 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -879,9 +879,17 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) { }); layoutItems.push({ description: "Arrange contents in grid", event: this.arrangeContents, icon: "table" }); layoutItems.push({ description: "Analyze Strokes", event: this.analyzeStrokes, icon: "paint-brush" }); + layoutItems.push({ description: "1: Note", event: () => this.createText("yellow"), icon: "eye" }); + layoutItems.push({ description: "2: Idea", event: () => this.createText("pink"), icon: "eye" }); + layoutItems.push({ description: "3: Topic", event: () => this.createText("lightBlue"), icon: "eye" }); + layoutItems.push({ description: "4: Person", event: () => this.createText("lightGreen"), icon: "eye" }); ContextMenu.Instance.addItem({ description: "Freeform Options ...", subitems: layoutItems, icon: "eye" }); } + createText = (color: string) => { + let pt = this.getTransform().transformPoint(ContextMenu.Instance.pageX, ContextMenu.Instance.pageY); + this.addLiveTextBox(Docs.Create.TextDocument({ x: pt[0], y: pt[1], backgroundColor: color })) + } private childViews = () => [ <CollectionFreeFormBackgroundView key="backgroundView" {...this.props} {...this.getDocumentViewProps(this.props.Document)} />, |
