diff options
author | Melissa Zhang <mzhang19096@gmail.com> | 2020-07-07 17:57:11 -0700 |
---|---|---|
committer | Melissa Zhang <mzhang19096@gmail.com> | 2020-07-07 17:57:11 -0700 |
commit | 901610007e7b33b1c3db3c93aa6e96dacd414256 (patch) | |
tree | 3107a24caecc9d151bcc60091adcbb07e3511222 /src/client/documents/Documents.ts | |
parent | 638879c606302f809ba4fcdc431a289a8bc01c2e (diff) |
Follow link directly to annotations
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 8c3abada6..763321a85 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -934,9 +934,9 @@ export namespace DocUtils { linkDoc.layout_linkView = Cast(Cast(Doc.UserDoc()["template-button-link"], Doc, null).dragFactory, Doc, null); Doc.GetProto(linkDoc).title = ComputedField.MakeFunction('self.anchor1?.title +" (" + (self.linkRelationship||"to") +") " + self.anchor2?.title'); - console.log("sourceAnnotationId, should be url?", sourceAnnotationId, StrCast(source.doc.data)); - Doc.GetProto(linkDoc).sourceRedirectUrl = Hypothesis.makeAnnotationUrl(sourceAnnotationId, StrCast(source.doc.data)); - // Doc.GetProto(linkDoc).targetRedirectUrl = undefined; + const sourceUrl = StrCast(source.doc.data.url); // The URL of the annotation's source web page + console.log("sourceAnnotationId, url", sourceAnnotationId, sourceUrl); + Doc.GetProto(linkDoc).annotationUrl = Hypothesis.makeAnnotationUrl(sourceAnnotationId, sourceUrl); Doc.GetProto(source.doc).links = ComputedField.MakeFunction("links(self)"); Doc.GetProto(target.doc).links = ComputedField.MakeFunction("links(self)"); |