diff options
| author | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-03-17 16:35:32 -0400 |
|---|---|---|
| committer | Naafiyan Ahmed <naafiyan@gmail.com> | 2022-03-17 16:35:32 -0400 |
| commit | cb5f0847b098d89a1390acf90579b3c7fbc5ac3e (patch) | |
| tree | 0266608b61495b5903ff419fa26e04fb5fbeef0a /src/client/views/GestureOverlay.tsx | |
| parent | f1f341b53a1a49427cf7ef40afdcd95a9b0e4e9d (diff) | |
| parent | 5c874c6829d9957696dfe61014173b6800c864df (diff) | |
Merge branch 'naafi-linking' of https://github.com/brown-dash/Dash-Web into naafi-linking
Diffstat (limited to 'src/client/views/GestureOverlay.tsx')
| -rw-r--r-- | src/client/views/GestureOverlay.tsx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/views/GestureOverlay.tsx b/src/client/views/GestureOverlay.tsx index 130e71924..05e5b7d5f 100644 --- a/src/client/views/GestureOverlay.tsx +++ b/src/client/views/GestureOverlay.tsx @@ -13,7 +13,7 @@ import { CognitiveServices } from "../cognitive_services/CognitiveServices"; import { DocUtils } from "../documents/Documents"; import { CurrentUserUtils } from "../util/CurrentUserUtils"; import { InteractionUtils } from "../util/InteractionUtils"; -import { Scripting } from "../util/Scripting"; +import { ScriptingGlobals } from "../util/ScriptingGlobals"; import { SelectionManager } from "../util/SelectionManager"; import { Transform } from "../util/Transform"; import { CollectionFreeFormViewChrome } from "./collections/CollectionMenu"; @@ -943,11 +943,11 @@ export enum ToolglassTools { None = "none", } -Scripting.addGlobal("GestureOverlay", GestureOverlay); -Scripting.addGlobal(function setToolglass(tool: any) { +ScriptingGlobals.add("GestureOverlay", GestureOverlay); +ScriptingGlobals.add(function setToolglass(tool: any) { runInAction(() => GestureOverlay.Instance.Tool = tool); }); -Scripting.addGlobal(function setPen(width: any, color: any, fill: any, arrowStart: any, arrowEnd: any, dash: any) { +ScriptingGlobals.add(function setPen(width: any, color: any, fill: any, arrowStart: any, arrowEnd: any, dash: any) { runInAction(() => { GestureOverlay.Instance.SavedColor = ActiveInkColor(); SetActiveInkColor(color); @@ -959,12 +959,12 @@ Scripting.addGlobal(function setPen(width: any, color: any, fill: any, arrowStar SetActiveDash(dash); }); }); -Scripting.addGlobal(function resetPen() { +ScriptingGlobals.add(function resetPen() { runInAction(() => { SetActiveInkColor(GestureOverlay.Instance.SavedColor ?? "rgb(0, 0, 0)"); SetActiveInkWidth(GestureOverlay.Instance.SavedWidth?.toString() ?? "2"); }); }, "resets the pen tool"); -Scripting.addGlobal(function createText(text: any, x: any, y: any) { +ScriptingGlobals.add(function createText(text: any, x: any, y: any) { GestureOverlay.Instance.dispatchGesture("text", [{ X: x, Y: y }], text); }, "creates a text document with inputted text and coordinates", "(text: any, x: any, y: any)"); |
