diff options
| author | bobzel <zzzman@gmail.com> | 2023-11-29 21:01:20 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-11-29 21:01:20 -0500 |
| commit | 18a201d2cab686e350374413630f93cfa4612b11 (patch) | |
| tree | b1cb600dcd383aa6d1a0cf0c049bb07ed5d7330d /src/client/views/collections/TabDocView.tsx | |
| parent | 48b0153d814cddad71caa8103e7ff4c761b66eaa (diff) | |
exposed menu option to pin Trails and other tree view docs and added open button. Allowed trails to be pinned to or embedded within other trails.
Diffstat (limited to 'src/client/views/collections/TabDocView.tsx')
| -rw-r--r-- | src/client/views/collections/TabDocView.tsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index 4f3c5b9a2..8abfddcd6 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -35,6 +35,7 @@ import { CollectionView } from './CollectionView'; import './TabDocView.scss'; import React = require('react'); import { Docs } from '../../documents/Documents'; +import { ComputedField } from '../../../fields/ScriptField'; const _global = (window /* browser */ || global) /* node */ as any; interface TabDocViewProps { @@ -261,9 +262,9 @@ export class TabDocView extends React.Component<TabDocViewProps> { } const anchorDoc = DocumentManager.Instance.getDocumentView(doc)?.ComponentView?.getAnchor?.(false, pinProps); const pinDoc = anchorDoc?.type === DocumentType.CONFIG ? anchorDoc : Docs.Create.ConfigDocument({}); - pinDoc.presentation_targetDoc = anchorDoc ?? doc; + const targDoc = (pinDoc.presentation_targetDoc = anchorDoc ?? doc); pinDoc.title = doc.title + ' - Slide'; - pinDoc.data = new List<Doc>(); // 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.data = targDoc.type === DocumentType.PRES ? ComputedField.MakeFunction('copyField(this.presentation_targetDoc.data') : new List<Doc>(); // 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; pinDoc.presentation_groupWithUp = false; |
