diff options
author | bobzel <zzzman@gmail.com> | 2023-01-09 15:52:20 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-01-09 15:52:20 -0500 |
commit | 947e9e6634b734dc8cbfbd45db4ecbeef7f5d753 (patch) | |
tree | 50d68585fa38a59f51ded8aca8a2eb88325fc56e | |
parent | 6d32fe60ce32d650a2ba0d5eb8e36dccb591521f (diff) |
changed default pres duration of pinned item to 2 secs. if not defined, default is 0.
-rw-r--r-- | src/client/views/collections/TabDocView.tsx | 1 | ||||
-rw-r--r-- | src/client/views/nodes/FilterBox.tsx | 2 | ||||
-rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index cd58319cb..5c05b5c13 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -253,6 +253,7 @@ export class TabDocView extends React.Component<TabDocViewProps> { pinDoc.title = doc.title + ' - Slide'; pinDoc.data = new List<Doc>(); // the children of the alias' layout are the presentation slide children. the alias' 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.presMovement = doc.type === DocumentType.SCRIPTING || pinProps?.pinDocLayout ? PresMovement.None : PresMovement.Zoom; + pinDoc.presDuration = 2000; pinDoc.groupWithUp = false; pinDoc.context = curPres; // these should potentially all be props passed down by the CollectionTreeView to the TreeView elements. That way the PresBox could configure all of its children at render time diff --git a/src/client/views/nodes/FilterBox.tsx b/src/client/views/nodes/FilterBox.tsx index 04d252abe..78ba499ec 100644 --- a/src/client/views/nodes/FilterBox.tsx +++ b/src/client/views/nodes/FilterBox.tsx @@ -33,7 +33,7 @@ export class FilterBox extends ViewBoxBaseComponent<FieldViewProps>() { constructor(props: Readonly<FieldViewProps>) { super(props); const targetDoc = FilterBox.targetDoc; - if (targetDoc && !targetDoc.currentFilter) targetDoc.currentFilter = FilterBox.createFilterDoc(); + if (targetDoc && !targetDoc.currentFilter) runInAction(() => (targetDoc.currentFilter = FilterBox.createFilterDoc())); } /// creates a new, empty filter doc diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 6f3dc5e82..c4935da35 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -572,7 +572,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { noSelect: true, originatingDoc: activeItem, easeFunc: StrCast(activeItem.presEaseFunc, 'ease') as any, - zoomTextSelections: true + zoomTextSelections: true, }; if (activeItem.presentationTargetDoc instanceof Doc) activeItem.presentationTargetDoc[AnimationSym] = undefined; var containerDocContext = srcContext ? [srcContext] : []; @@ -1250,7 +1250,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { const type = targetDoc.type; const transitionSpeed = activeItem.presTransition ? NumCast(activeItem.presTransition) / 1000 : 0.5; const zoom = NumCast(activeItem.presZoom, 1) * 100; - let duration = activeItem.presDuration ? NumCast(activeItem.presDuration) / 1000 : 2; + let duration = activeItem.presDuration ? NumCast(activeItem.presDuration) / 1000 : 0; if (activeItem.type === DocumentType.AUDIO) duration = NumCast(activeItem.duration); const effect = activeItem.presEffect ? activeItem.presEffect : PresMovement.None; // activeItem.presMovement = activeItem.presMovement ? activeItem.presMovement : PresMovement.Zoom; |