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/trails/PresBox.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/client/views/nodes/trails') diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index b8b926b57..9b74bb618 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -17,7 +17,7 @@ import { Docs } from "../../../documents/Documents"; import { DocumentType } from "../../../documents/DocumentTypes"; import { CurrentUserUtils } from "../../../util/CurrentUserUtils"; import { DocumentManager } from "../../../util/DocumentManager"; -import { Scripting } from "../../../util/Scripting"; +import { ScriptingGlobals } from "../../../util/ScriptingGlobals"; import { SelectionManager } from "../../../util/SelectionManager"; import { undoBatch, UndoManager } from "../../../util/UndoManager"; import { CollectionDockingView } from "../../collections/CollectionDockingView"; @@ -2468,7 +2468,7 @@ export class PresBox extends ViewBoxBaseComponent() { ; } } -Scripting.addGlobal(function lookupPresBoxField(container: Doc, field: string, data: Doc) { +ScriptingGlobals.add(function lookupPresBoxField(container: Doc, field: string, data: Doc) { if (field === 'indexInPres') return DocListCast(container[StrCast(container.presentationFieldKey)]).indexOf(data); if (field === 'presCollapsedHeight') return container._viewType === CollectionViewType.Stacking ? 35 : 31; if (field === 'presStatus') return container.presStatus; -- cgit v1.2.3-70-g09d2