aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DocumentManager.ts
diff options
context:
space:
mode:
authorAbdullah Ahmed <abdullah_ahmed@brown.edu>2019-08-28 21:06:02 -0400
committerAbdullah Ahmed <abdullah_ahmed@brown.edu>2019-08-28 21:06:02 -0400
commit38c8b841dcf3f42b96b3d93e7bcc2fc6c9495613 (patch)
tree9b0773f05ff9db5b67b47da398f2c16c2511f0bb /src/client/util/DocumentManager.ts
parente03a1b2cc90e0fdb7789f4826e482e9040aa7075 (diff)
parent4b7672c75fe5cdf6afe534e67213917b24980c3e (diff)
merged, docview still weird
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r--src/client/util/DocumentManager.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index 7f526b247..ec731da84 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -9,6 +9,7 @@ import { CollectionView } from '../views/collections/CollectionView';
import { DocumentView } from '../views/nodes/DocumentView';
import { LinkManager } from './LinkManager';
import { undoBatch, UndoManager } from './UndoManager';
+import { Scripting } from './Scripting';
export class DocumentManager {
@@ -202,4 +203,5 @@ export class DocumentManager {
return 1;
}
}
-} \ No newline at end of file
+}
+Scripting.addGlobal(function focus(doc: any) { DocumentManager.Instance.getDocumentViews(Doc.GetProto(doc)).map(view => view.props.focus(doc, true)); }); \ No newline at end of file