diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-13 16:40:26 -0500 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-03-13 16:40:26 -0500 |
commit | 74c8b78c7119e700655338a32c03f2031186b238 (patch) | |
tree | 57baf33d9230b7ea6f77addf34becae8faeb63b0 /src/client/util/CurrentUserUtils.ts | |
parent | 70a5edc6e9a203141b16fd31ee9a1a26ebae2188 (diff) | |
parent | e20a8916483734bb06d08409b6bc804c2391a289 (diff) |
minor changes
Diffstat (limited to 'src/client/util/CurrentUserUtils.ts')
-rw-r--r-- | src/client/util/CurrentUserUtils.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts index 3d53ad134..aafb986be 100644 --- a/src/client/util/CurrentUserUtils.ts +++ b/src/client/util/CurrentUserUtils.ts @@ -1,4 +1,4 @@ -import { computed, observable, reaction } from "mobx"; +import { computed, observable, reaction, action } from "mobx"; import * as rp from 'request-promise'; import { DataSym, Doc, DocListCast, DocListCastAsync, AclReadonly } from "../../fields/Doc"; import { Id } from "../../fields/FieldSymbols"; @@ -33,6 +33,8 @@ import { SearchUtil } from "./SearchUtil"; import { SelectionManager } from "./SelectionManager"; import { UndoManager } from "./UndoManager"; import { SnappingManager } from "./SnappingManager"; +import { InkTool } from "../../fields/InkField"; +import { computedFn } from "mobx-utils"; export let resolvedPorts: { server: number, socket: number }; @@ -1214,6 +1216,8 @@ export class CurrentUserUtils { public static get MyDashboards() { return Cast(Doc.UserDoc().myDashboards, Doc, null); } public static get EmptyPane() { return Cast(Doc.UserDoc().emptyPane, Doc, null); } public static get OverlayDocs() { return DocListCast((Doc.UserDoc().myOverlayDocs as Doc)?.data); } + public static set SelectedTool(tool: InkTool) { Doc.UserDoc().activeInkTool = tool; } + @computed public static get SelectedTool(): InkTool { return StrCast(Doc.UserDoc().activeInkTool, InkTool.None) as InkTool; } } Scripting.addGlobal(function openDragFactory(dragFactory: Doc) { |