aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DocumentManager.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-03-07 12:14:39 -0500
committerbobzel <zzzman@gmail.com>2022-03-07 12:14:39 -0500
commitc21919a2105bd1ed4f060be149624d064739a36c (patch)
treee88bbc4db244a08bd759e2985a31593a4b521911 /src/client/util/DocumentManager.ts
parent7fa30c3edd851cc42cb68063d9dbdd7335fe7370 (diff)
got rid of include cycles for Scripting globals to make hot updates work better.
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r--src/client/util/DocumentManager.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index e1dc96155..0a00ab6e0 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -9,7 +9,7 @@ import { CollectionView } from '../views/collections/CollectionView';
import { LightboxView } from '../views/LightboxView';
import { DocumentView, ViewAdjustment } from '../views/nodes/DocumentView';
import { LinkAnchorBox } from '../views/nodes/LinkAnchorBox';
-import { Scripting } from './Scripting';
+import { ScriptingGlobals } from './ScriptingGlobals';
import { SelectionManager } from './SelectionManager';
export class DocumentManager {
@@ -252,7 +252,7 @@ export class DocumentManager {
}
}
-Scripting.addGlobal(function DocFocusOrOpen(doc: any) {
+ScriptingGlobals.add(function DocFocusOrOpen(doc: any) {
const dv = DocumentManager.Instance.getDocumentView(doc);
if (dv && dv.props.Document === doc) {
dv.props.focus(doc, { willZoom: true });