aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/DocumentManager.ts
diff options
context:
space:
mode:
authorJames Hu <51237606+jameshu111@users.noreply.github.com>2023-06-07 11:46:41 -0400
committerJames Hu <51237606+jameshu111@users.noreply.github.com>2023-06-07 11:46:41 -0400
commit32b3261ae97a6d9c3c9e4c026dcd16bea61b3d73 (patch)
tree7c879a73240b22db95b47f8cbd4a8e040510419a /src/client/util/DocumentManager.ts
parent55502b8d24dbbad87af5b9059cc3a746e4db91d9 (diff)
parent3a70c915f3f2b64de72ac7cdff316184cb12db53 (diff)
Merge branch 'master' into james-video-loading
Diffstat (limited to 'src/client/util/DocumentManager.ts')
-rw-r--r--src/client/util/DocumentManager.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts
index 642ea26da..7a88ca991 100644
--- a/src/client/util/DocumentManager.ts
+++ b/src/client/util/DocumentManager.ts
@@ -1,5 +1,6 @@
import { action, computed, observable, ObservableSet } from 'mobx';
-import { AnimationSym, Doc, Opt } from '../../fields/Doc';
+import { Doc, Opt } from '../../fields/Doc';
+import { Animation } from '../../fields/DocSymbols';
import { Id } from '../../fields/FieldSymbols';
import { listSpec } from '../../fields/Schema';
import { Cast, DocCast, StrCast } from '../../fields/Types';
@@ -115,8 +116,7 @@ export class DocumentManager {
});
if (toReturn.length === 0) {
DocumentManager.Instance.DocumentViews.forEach(view => {
- const doc = view.rootDoc.proto;
- if (doc && doc[Id] && doc[Id] === id) {
+ if (Doc.GetProto(view.rootDoc)?.[Id] === id) {
toReturn.push(view);
}
});
@@ -295,7 +295,7 @@ export class DocumentManager {
Doc.linkFollowHighlight(docView.rootDoc, undefined, options.effect);
if (options.playAudio) DocumentManager.playAudioAnno(docView.rootDoc);
if (options.toggleTarget && (!options.didMove || docView.rootDoc.hidden)) docView.rootDoc.hidden = !docView.rootDoc.hidden;
- if (options.effect) docView.rootDoc[AnimationSym] = options.effect;
+ if (options.effect) docView.rootDoc[Animation] = options.effect;
if (options.zoomTextSelections && Doc.UnhighlightTimer && contextView && viewSpec.textHtml) {
// if the docView is a text anchor, the contextView is the PDF/Web/Text doc
@@ -304,7 +304,7 @@ export class DocumentManager {
DocumentManager._overlayViews.add(contextView);
}
Doc.AddUnHighlightWatcher(() => {
- docView.rootDoc[AnimationSym] = undefined;
+ docView.rootDoc[Animation] = undefined;
DocumentManager.removeOverlayViews();
contextView && (contextView.htmlOverlayEffect = '');
});