From e6b882080471d915a80400e7e9a97ff78a232147 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 18 May 2022 14:05:39 -0400 Subject: fixed linking bug so that both start and end link can be regions. added zoom to target checkbox for link editing. extracted out a new field pointerEvents so that lockPosition is not automatically conflratd with no pointer events. updated freeformview focus to work with zooming on region selections. --- src/client/views/DocumentButtonBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/client/views/DocumentButtonBar.tsx') diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx index 9b95f1525..ffa168f6b 100644 --- a/src/client/views/DocumentButtonBar.tsx +++ b/src/client/views/DocumentButtonBar.tsx @@ -192,7 +192,7 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV
{"Set onClick to follow primary link"}
}>
this.props.views().map(view => view?.docView?.toggleFollowLink(undefined, false, false)))}> + onClick={undoBatch(e => this.props.views().map(view => view?.docView?.toggleFollowLink(undefined, undefined, false)))}>
; -- cgit v1.2.3-70-g09d2 From 5c9b6595a24c5f65bd3935136e64587056aa26a9 Mon Sep 17 00:00:00 2001 From: bobzel Date: Sun, 5 Jun 2022 16:55:05 -0400 Subject: some changes to prevent presBox from iconifying when typing enter for pres item preropty values. also fix so that pinwithView for video stores the start and end time of the video. --- src/client/views/DocumentButtonBar.tsx | 3 +++ src/client/views/nodes/trails/PresBox.tsx | 16 +++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'src/client/views/DocumentButtonBar.tsx') diff --git a/src/client/views/DocumentButtonBar.tsx b/src/client/views/DocumentButtonBar.tsx index ffa168f6b..25297e167 100644 --- a/src/client/views/DocumentButtonBar.tsx +++ b/src/client/views/DocumentButtonBar.tsx @@ -224,6 +224,9 @@ export class DocumentButtonBar extends React.Component<{ views: () => (DocumentV activeDoc.presPinView = true; activeDoc.presPinViewScroll = scroll; } else if (targetDoc.type === DocumentType.VID) { + activeDoc.presPinView = true; + activeDoc.presStartTime = targetDoc._currentTimecode; + activeDoc.presEndTime = NumCast(targetDoc._currentTimecode) + 0.1; activeDoc.presPinTimecode = targetDoc._currentTimecode; } else if (pannable) { const x = targetDoc._panX; diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index ab5382581..18344a11d 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -335,7 +335,7 @@ export class PresBox extends ViewBoxBaseComponent() { } else if (bestTarget.type === DocumentType.COMPARISON) { bestTarget._clipWidth = activeItem.presPinClipWidth; } else if (bestTarget.type === DocumentType.VID) { - bestTarget._currentTimecode = activeItem.presPinTimecode; + bestTarget._currentTimecode = activeItem.presStartTime; } else { bestTarget._viewTransition = activeItem.presTransition ? `transform ${activeItem.presTransition}ms` : 'all 0.5s'; bestTarget._panX = activeItem.presPinViewX; @@ -1210,6 +1210,7 @@ export class PresBox extends ViewBoxBaseComponent() {
e.stopPropagation()} onChange={action((e) => this.setTransitionTime(e.target.value))} /> s
@@ -1249,6 +1250,7 @@ export class PresBox extends ViewBoxBaseComponent() {
e.stopPropagation()} onChange={action((e) => this.setDurationTime(e.target.value))} /> s
@@ -1362,7 +1364,8 @@ export class PresBox extends ViewBoxBaseComponent() { activeItem.presPinView = true; activeItem.presPinViewScroll = scroll; } else if (targetDoc.type === DocumentType.VID) { - activeItem.presPinTimecode = targetDoc._currentTimecode; + 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) { const x = targetDoc._panX; const y = targetDoc._panY; @@ -1384,7 +1387,8 @@ export class PresBox extends ViewBoxBaseComponent() { const scroll = targetDoc._scrollTop; activeItem.presPinViewScroll = scroll; } else if (targetDoc.type === DocumentType.VID) { - activeItem.presPinTimecode = targetDoc._currentTimecode; + activeItem.presStartTime = targetDoc._currentTimecode; + activeItem.presStartTime = NumCast(targetDoc._currentTimecode) + 0.1; } else if (targetDoc.type === DocumentType.COMPARISON) { const clipWidth = targetDoc._clipWidth; activeItem.presPinClipWidth = clipWidth; @@ -1414,6 +1418,7 @@ export class PresBox extends ViewBoxBaseComponent() { e.stopPropagation()} onChange={action((e: React.ChangeEvent) => { const val = e.target.value; activeItem.presPinViewX = Number(val); })} />
@@ -1423,6 +1428,7 @@ export class PresBox extends ViewBoxBaseComponent() { e.stopPropagation()} onChange={action((e: React.ChangeEvent) => { const val = e.target.value; activeItem.presPinViewY = Number(val); })} /> @@ -1432,6 +1438,7 @@ export class PresBox extends ViewBoxBaseComponent() { e.stopPropagation()} onChange={action((e: React.ChangeEvent) => { const val = e.target.value; activeItem.presPinViewScale = Number(val); })} /> @@ -1452,6 +1459,7 @@ export class PresBox extends ViewBoxBaseComponent() { e.stopPropagation()} onChange={action((e: React.ChangeEvent) => { const val = e.target.value; activeItem.presPinViewScroll = Number(val); })} /> @@ -1498,6 +1506,7 @@ export class PresBox extends ViewBoxBaseComponent() { e.stopPropagation()} onChange={action((e: React.ChangeEvent) => { activeItem.presStartTime = Number(e.target.value); })} /> @@ -1516,6 +1525,7 @@ export class PresBox extends ViewBoxBaseComponent() {
e.stopPropagation()} style={{ textAlign: 'center', width: 30, height: 15, fontSize: 10 }} type="number" value={NumCast(activeItem.presEndTime)} onChange={action((e: React.ChangeEvent) => { activeItem.presEndTime = Number(e.target.value); })} -- cgit v1.2.3-70-g09d2