From 79e6a98e6a8023a7b6473fdac045c740012e626f Mon Sep 17 00:00:00 2001 From: monoguitari Date: Thu, 21 Sep 2023 10:38:46 -0400 Subject: View paths button fix attempt --- src/client/views/collections/TabDocView.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index 26aa5a121..715aaa7cb 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -261,8 +261,10 @@ export class TabDocView extends React.Component { } const anchorDoc = DocumentManager.Instance.getDocumentView(doc)?.ComponentView?.getAnchor?.(false, pinProps); const pinDoc = anchorDoc?.type === DocumentType.CONFIG ? anchorDoc : Doc.MakeDelegate(anchorDoc && anchorDoc !== doc ? anchorDoc : doc); - pinDoc.presentation_targetDoc = anchorDoc ?? doc; + pinDoc.presentation_targetDoc = doc ?? anchorDoc; // used to be set to anchorDoc ?? doc but this makes the trail path button update dynamically pinDoc.title = doc.title + ' - Slide'; + pinDoc.x = doc.x; + pinDoc.y = doc.y; pinDoc.data = new List(); // the children of the embedding's layout are the presentation slide children. the embedding's data field might be children of a collection, PDF data, etc -- in any case we don't want the tree view to "see" this data pinDoc.presentation_movement = doc.type === DocumentType.SCRIPTING || pinProps?.pinDocLayout ? PresMovement.None : PresMovement.Zoom; pinDoc.presentation_duration = pinDoc.presentation_duration ?? 1000; -- cgit v1.2.3-70-g09d2 From 5241f72202b35d25b570b7ebe7d1fd4d5fb7c527 Mon Sep 17 00:00:00 2001 From: geireann Date: Thu, 21 Sep 2023 11:50:13 -0400 Subject: better fix for show paths --- src/client/views/collections/TabDocView.tsx | 4 +--- src/client/views/nodes/trails/PresBox.tsx | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index 715aaa7cb..38d8fe438 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -261,10 +261,8 @@ export class TabDocView extends React.Component { } const anchorDoc = DocumentManager.Instance.getDocumentView(doc)?.ComponentView?.getAnchor?.(false, pinProps); const pinDoc = anchorDoc?.type === DocumentType.CONFIG ? anchorDoc : Doc.MakeDelegate(anchorDoc && anchorDoc !== doc ? anchorDoc : doc); - pinDoc.presentation_targetDoc = doc ?? anchorDoc; // used to be set to anchorDoc ?? doc but this makes the trail path button update dynamically + pinDoc.presentation_targetDoc = anchorDoc ?? doc; // used to be set to anchorDoc ?? doc but this makes the trail path button update dynamically pinDoc.title = doc.title + ' - Slide'; - pinDoc.x = doc.x; - pinDoc.y = doc.y; pinDoc.data = new List(); // the children of the embedding's layout are the presentation slide children. the embedding's data field might be children of a collection, PDF data, etc -- in any case we don't want the tree view to "see" this data pinDoc.presentation_movement = doc.type === DocumentType.SCRIPTING || pinProps?.pinDocLayout ? PresMovement.None : PresMovement.Zoom; pinDoc.presentation_duration = pinDoc.presentation_duration ?? 1000; diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index bcec2d2bd..5900c0421 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -1376,7 +1376,7 @@ export class PresBox extends ViewBoxBaseComponent() { @computed get paths() { let pathPoints = ''; this.childDocs.forEach((doc, index) => { - const tagDoc = Cast(doc.presentation_targetDoc, Doc, null); + const tagDoc = PresBox.targetRenderedDoc(doc); if (tagDoc) { const n1x = NumCast(tagDoc.x) + NumCast(tagDoc._width) / 2; const n1y = NumCast(tagDoc.y) + NumCast(tagDoc._height) / 2; -- cgit v1.2.3-70-g09d2 From c61d61335f621d81ef00bd464cc374417ef5516c Mon Sep 17 00:00:00 2001 From: geireann Date: Thu, 21 Sep 2023 11:51:17 -0400 Subject: from last --- src/client/views/collections/TabDocView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index 38d8fe438..26aa5a121 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -261,7 +261,7 @@ export class TabDocView extends React.Component { } const anchorDoc = DocumentManager.Instance.getDocumentView(doc)?.ComponentView?.getAnchor?.(false, pinProps); const pinDoc = anchorDoc?.type === DocumentType.CONFIG ? anchorDoc : Doc.MakeDelegate(anchorDoc && anchorDoc !== doc ? anchorDoc : doc); - pinDoc.presentation_targetDoc = anchorDoc ?? doc; // used to be set to anchorDoc ?? doc but this makes the trail path button update dynamically + pinDoc.presentation_targetDoc = anchorDoc ?? doc; pinDoc.title = doc.title + ' - Slide'; pinDoc.data = new List(); // the children of the embedding's layout are the presentation slide children. the embedding's data field might be children of a collection, PDF data, etc -- in any case we don't want the tree view to "see" this data pinDoc.presentation_movement = doc.type === DocumentType.SCRIPTING || pinProps?.pinDocLayout ? PresMovement.None : PresMovement.Zoom; -- cgit v1.2.3-70-g09d2