diff options
author | bobzel <zzzman@gmail.com> | 2019-09-23 13:30:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-23 13:30:11 -0400 |
commit | 87407e68556db6f0c8641baf6b6d6dba98e4bbc5 (patch) | |
tree | 6c41e6f5be3645060e6515f0ffc531c2585e2d6e /src/client/documents/Documents.ts | |
parent | c2dff9d46071952c6fca450952bcb0952a9bba86 (diff) | |
parent | 910a3de2c294b1f5e074eef3cbfe043462ef22dd (diff) |
Merge pull request #281 from browngraphicslab/doc_deco_claire
Automatically scroll to target when following a link to a text region (#268)
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index 2fa0d2dcb..4ae770e25 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -638,7 +638,6 @@ export namespace DocUtils { }); } export function MakeLink(source: Doc, target: Doc, targetContext?: Doc, title: string = "", description: string = "", sourceContext?: Doc, id?: string, anchored1?: boolean) { - if (LinkManager.Instance.doesLinkExist(source, target)) return undefined; let sv = DocumentManager.Instance.getDocumentView(source); if (sv && sv.props.ContainingCollectionDoc === target) return; if (target === CurrentUserUtils.UserDocument) return undefined; @@ -651,7 +650,6 @@ export namespace DocUtils { linkDocProto.sourceContext = sourceContext; linkDocProto.title = title === "" ? source.title + " to " + target.title : title; linkDocProto.linkDescription = description; - linkDocProto.type = DocumentType.LINK; linkDocProto.anchor1 = source; linkDocProto.anchor1Page = source.curPage; @@ -665,6 +663,7 @@ export namespace DocUtils { Doc.GetProto(source).links = ComputedField.MakeFunction("links(this)"); Doc.GetProto(target).links = ComputedField.MakeFunction("links(this)"); + }, "make link"); return linkDocProto; } |