From c21919a2105bd1ed4f060be149624d064739a36c Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 7 Mar 2022 12:14:39 -0500 Subject: got rid of include cycles for Scripting globals to make hot updates work better. --- src/client/views/nodes/button/ButtonScripts.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes/button/ButtonScripts.ts') 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 -- cgit v1.2.3-70-g09d2