aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/button/ButtonScripts.ts
diff options
context:
space:
mode:
authorNaafiyan Ahmed <naafiyan@gmail.com>2022-03-17 16:35:32 -0400
committerNaafiyan Ahmed <naafiyan@gmail.com>2022-03-17 16:35:32 -0400
commitcb5f0847b098d89a1390acf90579b3c7fbc5ac3e (patch)
tree0266608b61495b5903ff419fa26e04fb5fbeef0a /src/client/views/nodes/button/ButtonScripts.ts
parentf1f341b53a1a49427cf7ef40afdcd95a9b0e4e9d (diff)
parent5c874c6829d9957696dfe61014173b6800c864df (diff)
Merge branch 'naafi-linking' of https://github.com/brown-dash/Dash-Web into naafi-linking
Diffstat (limited to 'src/client/views/nodes/button/ButtonScripts.ts')
-rw-r--r--src/client/views/nodes/button/ButtonScripts.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/button/ButtonScripts.ts b/src/client/views/nodes/button/ButtonScripts.ts
index bb4dd8bc9..f3731b8f9 100644
--- a/src/client/views/nodes/button/ButtonScripts.ts
+++ b/src/client/views/nodes/button/ButtonScripts.ts
@@ -1,14 +1,14 @@
-import { Scripting } from "../../../util/Scripting";
+import { ScriptingGlobals } from "../../../util/ScriptingGlobals";
import { SelectionManager } from "../../../util/SelectionManager";
// toggle: Set overlay status of selected document
-Scripting.addGlobal(function changeView(view: string) {
+ScriptingGlobals.add(function changeView(view: string) {
const selected = SelectionManager.Views().length ? SelectionManager.Views()[0] : undefined;
selected ? selected.Document._viewType = view : console.log("[FontIconBox.tsx] changeView failed");
});
// toggle: Set overlay status of selected document
-Scripting.addGlobal(function toggleOverlay() {
+ScriptingGlobals.add(function toggleOverlay() {
const selected = SelectionManager.Views().length ? SelectionManager.Views()[0] : undefined;
selected ? selected.props.CollectionFreeFormDocumentView?.().float() : console.log("failed");
}); \ No newline at end of file