aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-09 18:27:51 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-09 18:27:51 -0400
commitae64711a1bcfc35c9ca0c86d99c99962642c9b09 (patch)
treebe26475ec799139fd1f9c374ab0c8d604a02bbfa /src/client/documents/Documents.ts
parent8bca5882b39c21560c29cb97c2770a7a78384018 (diff)
fixed links to have a timecode again. updated a bunch of this.Document calls to this.layoutDoc, this.dataDoc, etc
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 88179afd9..c823c3233 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -511,7 +511,7 @@ export namespace Docs {
export function ScriptingDocument(script: Opt<ScriptField>, options: DocumentOptions = {}, fieldKey?: string) {
const res = InstanceFromProto(Prototypes.get(DocumentType.SCRIPTING), script, options);
- fieldKey && res.proto instanceof Doc && ((res.proto as Doc).layout = ScriptingBox.LayoutString(fieldKey));
+ fieldKey && res.proto instanceof Doc && (res.proto.layout = ScriptingBox.LayoutString(fieldKey));
return res;
}
@@ -554,6 +554,8 @@ export namespace Docs {
const linkDocProto = Doc.GetProto(doc);
linkDocProto.anchor1 = source.doc;
linkDocProto.anchor2 = target.doc;
+ linkDocProto.anchor1_timecode = source.doc.currentTimecode || source.doc.displayTimecode;
+ linkDocProto.anchor2_timecode = target.doc.currentTimecode || target.doc.displayTimecode;
if (linkDocProto.layout_key1 === undefined) {
Cast(linkDocProto.proto, Doc, null).layout_key1 = LinkAnchorBox.LayoutString("anchor1");