aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/trails
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-01-25 12:59:50 -0500
committerbobzel <zzzman@gmail.com>2023-01-25 12:59:50 -0500
commit1763ff090ea734ca275c3c28edc6c303c935b801 (patch)
tree88630593b7bcdf109fa04f427fe565ce234667d8 /src/client/views/nodes/trails
parent555d67a31adbe7e6d42f7f7805ba1348e6d505f6 (diff)
added a linkFollow o[ption to choose between opening target, or highest level collection containing target. fixed adding marker annotations to pdf/web/etc. fixed following link to wikipedia pages to not create a new document each time. made searchBox's search function static so that it can be called programmatically. Fixed LinkDocPreview to not flicker when doing a nopreview link follow. changed PlayTrail to restore state of all freeform collections containing source anchor.
Diffstat (limited to 'src/client/views/nodes/trails')
-rw-r--r--src/client/views/nodes/trails/PresBox.tsx16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx
index 4a60c99ec..ff05dcdcb 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -624,14 +624,18 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
};
_exitTrail: Opt<() => void>;
- PlayTrail = (doc: Doc) => {
- const savedState = { c: doc, x: NumCast(doc.panX), y: NumCast(doc.panY), s: NumCast(doc.viewScale) };
+ PlayTrail = (docs: Doc[]) => {
+ const savedStates = docs.map(doc => (doc._viewType !== CollectionViewType.Freeform ? undefined : { c: doc, x: NumCast(doc.panX), y: NumCast(doc.panY), s: NumCast(doc.viewScale) }));
this.startPresentation(0);
this._exitTrail = () => {
- const { x, y, s, c } = savedState;
- c._panX = x;
- c._panY = y;
- c._viewScale = s;
+ savedStates
+ .filter(savedState => savedState)
+ .map(savedState => {
+ const { x, y, s, c } = savedState!;
+ c._panX = x;
+ c._panY = y;
+ c._viewScale = s;
+ });
LightboxView.SetLightboxDoc(undefined);
Doc.RemoveDocFromList(Doc.MyOverlayDocs, undefined, this.rootDoc);
return PresStatus.Edit;