diff options
| author | bobzel <zzzman@gmail.com> | 2023-02-02 09:55:53 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-02-02 09:55:53 -0500 |
| commit | ee2401ac9138f7bb328ec5ff132fdcb21f7f2373 (patch) | |
| tree | fb71612b7ca110ce31c6d489b4dfe98532440180 /src/client/views/nodes/trails/PresBox.tsx | |
| parent | 930bdf84ab4f4489f5072f9c082b732f060d880d (diff) | |
pause playing trails when collections are panned/zoomed. don't open mini trail player when following trail link if the trail is already shown
Diffstat (limited to 'src/client/views/nodes/trails/PresBox.tsx')
| -rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index d9bc2d981..427911bd3 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -687,7 +687,9 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { * directly at start. * @param startIndex: index that the presentation will start at */ + @action startPresentation = (startIndex: number) => { + PresBox.Instance = this; clearTimeout(this._presTimer); if (this.childDocs.length) { this.layoutDoc.presStatus = PresStatus.Autoplay; @@ -2122,7 +2124,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { @action startOrPause = (makeActive = true) => { makeActive && this.updateCurrentPresentation(); - if (this.layoutDoc.presStatus === PresStatus.Manual || this.layoutDoc.presStatus === PresStatus.Edit) this.startPresentation(this.itemIndex); + if (!this.layoutDoc.presStatus || this.layoutDoc.presStatus === PresStatus.Manual || this.layoutDoc.presStatus === PresStatus.Edit) this.startPresentation(this.itemIndex); else this.pauseAutoPres(); }; |
