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/util/LinkFollower.ts | |
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/util/LinkFollower.ts')
-rw-r--r-- | src/client/util/LinkFollower.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/util/LinkFollower.ts b/src/client/util/LinkFollower.ts index 57618b53c..bbfd516da 100644 --- a/src/client/util/LinkFollower.ts +++ b/src/client/util/LinkFollower.ts @@ -116,8 +116,9 @@ export class LinkFollower { if (target.type === DocumentType.PRES) { const containerDocContext = DocumentManager.GetContextPath(sourceDoc, true); // gather all views that affect layout of sourceDoc so we can revert them after playing the rail SelectionManager.DeselectAll(); - DocumentManager.Instance.AddViewRenderedCb(target, dv => containerDocContext.length && (dv.ComponentView as PresBox).PlayTrail(containerDocContext)); - PresBox.OpenPresMinimized(target, [0, 0]); + if (!DocumentManager.Instance.AddViewRenderedCb(target, dv => containerDocContext.length && (dv.ComponentView as PresBox).PlayTrail(containerDocContext))) { + PresBox.OpenPresMinimized(target, [0, 0]); + } finished?.(); } else { const containerDocContext = DocumentManager.GetContextPath(target); |