diff options
author | bobzel <zzzman@gmail.com> | 2023-07-02 16:47:35 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-07-02 16:47:35 -0400 |
commit | 330598d12d0e05a294a4b2b95a4f1c275c04b4c1 (patch) | |
tree | 8d44e8a62b794caa44e032e7ebaa804693b05eea /src | |
parent | 02926d42bd7dfefbf87709abb45f1b359e4bfcdf (diff) |
fixed animations in lightbox view because showDocument() was finding the wrong view previously.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/util/DocumentManager.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index fb6bc67d8..3f0848d00 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -25,7 +25,13 @@ export class DocumentManager { @observable public RecordingEvent = 0; @observable public LinkedDocumentViews: { a: DocumentView; b: DocumentView; l: Doc }[] = []; @computed public get DocumentViews() { - return Array.from(this._documentViews).filter(view => !(view.ComponentView instanceof KeyValueBox)); + return Array.from(this._documentViews).filter(view => !(view.ComponentView instanceof KeyValueBox) && (!LightboxView.LightboxDoc || LightboxView.IsLightboxDocView(view.docViewPath))); + } + public AddDocumentView(dv: DocumentView) { + this._documentViews.add(dv); + } + public DeleteDocumentView(dv: DocumentView) { + this._documentViews.delete(dv); } private static _instance: DocumentManager; @@ -83,7 +89,7 @@ export class DocumentManager { // this.LinkedDocumentViews.forEach(view => console.log(" LV = " + view.a.props.Document.title + "/" + view.a.props.LayoutTemplateString + " --> " + // view.b.props.Document.title + "/" + view.b.props.LayoutTemplateString)); } else { - this._documentViews.add(view); + this.AddDocumentView(view); } this.callAddViewFuncs(view); }; @@ -101,7 +107,7 @@ export class DocumentManager { const index = this.LinkAnchorBoxViews.indexOf(view); this.LinkAnchorBoxViews.splice(index, 1); } else { - this._documentViews.delete(view); + this.DeleteDocumentView(view); } SelectionManager.DeselectView(view); }); |