diff options
| author | bobzel <zzzman@gmail.com> | 2023-04-11 14:43:54 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-04-11 14:43:54 -0400 |
| commit | 5d1e3710a015d8915bd367ece753817d84d9d916 (patch) | |
| tree | 2afe01737254c38dcd9f1959cdb1e479cb49b84a /src/client/views/MarqueeAnnotator.tsx | |
| parent | 8a1267faf796b2e2a30a6ba9f86879854e9ee983 (diff) | |
exracted FollowLinkScript() function. got rid of template parameters to simplify templating.
Diffstat (limited to 'src/client/views/MarqueeAnnotator.tsx')
| -rw-r--r-- | src/client/views/MarqueeAnnotator.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx index 6b4f8ad85..ede387927 100644 --- a/src/client/views/MarqueeAnnotator.tsx +++ b/src/client/views/MarqueeAnnotator.tsx @@ -15,6 +15,7 @@ import { FormattedTextBox } from './nodes/formattedText/FormattedTextBox'; import { AnchorMenu } from './pdf/AnchorMenu'; import React = require('react'); import { ScriptField } from '../../fields/ScriptField'; +import { FollowLinkScript } from '../util/LinkFollower'; const _global = (window /* browser */ || global) /* node */ as any; export interface MarqueeAnnotatorProps { @@ -148,7 +149,7 @@ export class MarqueeAnnotator extends React.Component<MarqueeAnnotatorProps> { const anno = savedAnnos[0]; const containerOffset = this.props.containerOffset?.() || [0, 0]; const marqueeAnno = Docs.Create.FreeformDocument([], { - onClick: isLinkButton ? ScriptField.MakeScript('followLink(this,altKey)', { altKey: 'boolean' }) : undefined, + onClick: isLinkButton ? FollowLinkScript() : undefined, backgroundColor: color, annotationOn: this.props.rootDoc, title: 'Annotation on ' + this.props.rootDoc.title, |
