diff options
| author | bobzel <zzzman@gmail.com> | 2021-01-27 12:13:21 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-01-27 12:13:21 -0500 |
| commit | 31faf2b0683fc15c040d47425f931531c0d8a0f8 (patch) | |
| tree | d2c4191587d5282aa1b43c13b323a38d8c5f6c0e /src/client/views/collections/CollectionStackedTimeline.tsx | |
| parent | 3576c88e3c5bc9c6745c2f7fa70721c4057cae0e (diff) | |
fixed size of timeline toggle on videoBox and some other tweaks to hide documentdeocrations on timeline items.
Diffstat (limited to 'src/client/views/collections/CollectionStackedTimeline.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackedTimeline.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx index 44fc0f709..54cc86523 100644 --- a/src/client/views/collections/CollectionStackedTimeline.tsx +++ b/src/client/views/collections/CollectionStackedTimeline.tsx @@ -84,8 +84,8 @@ export class CollectionStackedTimeline extends CollectionSubView<PanZoomDocument } } - anchorStart = (anchor: Doc) => NumCast(anchor.anchorStartTime, NumCast(anchor._timecodeToShow, NumCast(anchor.videoStart))); - anchorEnd = (anchor: Doc, defaultVal: any = null) => NumCast(anchor.anchorEndTime, NumCast(anchor._timecodeToHide, NumCast(anchor.videoEnd, defaultVal))); + anchorStart = (anchor: Doc) => NumCast(anchor.anchorStartTime, NumCast(anchor._timecodeToShow, NumCast(anchor.videoStart, NumCast(anchor.audioStart)))); + anchorEnd = (anchor: Doc, val: any = null) => NumCast(anchor.anchorEndTime, NumCast(anchor._timecodeToHide, NumCast(anchor.videoEnd, NumCast(anchor.audioEnd, val)))); getLinkData(l: Doc) { let la1 = l.anchor1 as Doc; @@ -106,7 +106,11 @@ export class CollectionStackedTimeline extends CollectionSubView<PanZoomDocument // updates the anchor with the new time @action changeAnchor = (anchor: Opt<Doc>, time: number) => { - anchor && (this._left ? anchor.anchorStartTime = time : anchor.anchorEndTime = time); + if (anchor) { + const timelineOnly = Cast(anchor.anchorStartTime, "number", null) !== undefined; + if (timelineOnly) this._left ? anchor.anchorStartTime = time : anchor.anchorEndTime = time; + else this._left ? anchor._timecodeToShow = time : anchor._timecodeToHide = time; + } } // checks if the two anchors are the same with start and end time @@ -288,6 +292,7 @@ export class CollectionStackedTimeline extends CollectionSubView<PanZoomDocument onClick={script} onDoubleClick={this.props.Document.autoPlay ? undefined : doublescript} ignoreAutoHeight={false} + hideDecorations={true} bringToFront={emptyFunction} scriptContext={this} /> }; |
