diff options
author | bobzel <zzzman@gmail.com> | 2022-06-06 11:11:34 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-06-06 11:11:34 -0400 |
commit | 9af41a75b3b8f114b5297ff83823560425fbd2ac (patch) | |
tree | 7ecc06fd8f2eaf7c3142d9b35bc312521eb93c19 /src | |
parent | 9acba91baa0ee2ee43106d344392039a2cbd0e46 (diff) |
fixes for audio box pin with view.
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/DocumentButtonBar.tsx | 2 | ||||
-rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx index 25297e167..b2f4b82a4 100644 --- a/src/client/views/DocumentButtonBar.tsx +++ b/src/client/views/DocumentButtonBar.tsx @@ -223,7 +223,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV const scroll = targetDoc._scrollTop; activeDoc.presPinView = true; activeDoc.presPinViewScroll = scroll; - } else if (targetDoc.type === DocumentType.VID) { + } else if ([DocumentType.AUDIO, DocumentType.VID].includes(targetDoc.type as any)) { activeDoc.presPinView = true; activeDoc.presStartTime = targetDoc._currentTimecode; activeDoc.presEndTime = NumCast(targetDoc._currentTimecode) + 0.1; diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index e32f2826f..dea6b818f 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -334,7 +334,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { bestTarget._scrollTop = activeItem.presPinViewScroll; } else if (bestTarget.type === DocumentType.COMPARISON) { bestTarget._clipWidth = activeItem.presPinClipWidth; - } else if (bestTarget.type === DocumentType.VID) { + } else if ([DocumentType.AUDIO, DocumentType.VID].includes(bestTarget.type as any)) { bestTarget._currentTimecode = activeItem.presStartTime; } else { bestTarget._viewTransition = activeItem.presTransition ? `transform ${activeItem.presTransition}ms` : 'all 0.5s'; @@ -1363,7 +1363,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { const scroll = targetDoc._scrollTop; activeItem.presPinView = true; activeItem.presPinViewScroll = scroll; - } else if (targetDoc.type === DocumentType.VID) { + } else if ([DocumentType.AUDIO, DocumentType.VID].includes(targetDoc.type as any)) { activeItem.presStartTime = targetDoc._currentTimecode; activeItem.presEndTime = NumCast(targetDoc._currentTimecode) + 0.1; } else if ((targetDoc.type === DocumentType.COL && targetDoc._viewType === CollectionViewType.Freeform) || targetDoc.type === DocumentType.IMG) { @@ -1386,7 +1386,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { if (targetDoc.type === DocumentType.PDF || targetDoc.type === DocumentType.WEB || targetDoc.type === DocumentType.RTF) { const scroll = targetDoc._scrollTop; activeItem.presPinViewScroll = scroll; - } else if (targetDoc.type === DocumentType.VID) { + } else if ([DocumentType.AUDIO, DocumentType.VID].includes(targetDoc.type as any)) { activeItem.presStartTime = targetDoc._currentTimecode; activeItem.presStartTime = NumCast(targetDoc._currentTimecode) + 0.1; } else if (targetDoc.type === DocumentType.COMPARISON) { |