aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/VideoBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-04-11 14:43:54 -0400
committerbobzel <zzzman@gmail.com>2023-04-11 14:43:54 -0400
commit5d1e3710a015d8915bd367ece753817d84d9d916 (patch)
tree2afe01737254c38dcd9f1959cdb1e479cb49b84a /src/client/views/nodes/VideoBox.tsx
parent8a1267faf796b2e2a30a6ba9f86879854e9ee983 (diff)
exracted FollowLinkScript() function. got rid of template parameters to simplify templating.
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
-rw-r--r--src/client/views/nodes/VideoBox.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index 83ad5628c..b144c9318 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -34,6 +34,7 @@ import { RecordingBox } from './RecordingBox';
import { PinProps, PresBox } from './trails';
import './VideoBox.scss';
import { ScriptField } from '../../../fields/ScriptField';
+import { FollowLinkScript } from '../../util/LinkFollower';
const path = require('path');
/**
@@ -325,7 +326,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp
_width: 150,
_height: 50,
title: (this.layoutDoc._currentTimecode || 0).toString(),
- onClick: ScriptField.MakeScript('followLink(this,altKey)', { altKey: 'boolean' }),
+ onClick: FollowLinkScript(),
});
this.props.addDocument?.(b);
DocUtils.MakeLink(b, this.rootDoc, { linkRelationship: 'video snapshot' });
@@ -369,7 +370,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProp
_nativeHeight: Doc.NativeHeight(this.layoutDoc),
x: NumCast(this.layoutDoc.x) + width,
y: NumCast(this.layoutDoc.y),
- onClick: ScriptField.MakeScript('followLink(this,altKey)', { altKey: 'boolean' }),
+ onClick: FollowLinkScript(),
_width: 150,
_height: (height / width) * 150,
title: '--snapshot' + NumCast(this.layoutDoc._currentTimecode) + ' image-',