diff options
| author | bobzel <zzzman@gmail.com> | 2020-09-10 10:59:58 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-09-10 10:59:58 -0400 |
| commit | 75fa8e7e798566962d88fc3012c41c3179580e39 (patch) | |
| tree | 801fd607e0ed6a5b0083ec1899567f59406336e7 /src/client/util | |
| parent | 075b626e1eab5d2852d5157c4105e3110e4fe7e4 (diff) | |
fixed following links on text hyperlink to use same code as linkMenu. fixed hyperlink delete button
Diffstat (limited to 'src/client/util')
| -rw-r--r-- | src/client/util/DocumentManager.ts | 2 | ||||
| -rw-r--r-- | src/client/util/LinkManager.ts | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 420b29559..37d639a07 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -109,7 +109,7 @@ export class DocumentManager { const pairs = DocumentManager.Instance.DocumentViews.reduce((pairs, dv) => { const linksList = DocListCast(dv.props.Document.links); pairs.push(...linksList.reduce((pairs, link) => { - const linkToDoc = link && LinkManager.Instance.getOppositeAnchor(link, dv.props.Document); + const linkToDoc = link && LinkManager.getOppositeAnchor(link, dv.props.Document); linkToDoc && DocumentManager.Instance.getDocumentViews(linkToDoc).map(docView1 => { if (dv.props.Document.type !== DocumentType.LINK || dv.props.LayoutTemplateString !== docView1.props.LayoutTemplateString) { pairs.push({ a: dv, b: docView1, l: link }); diff --git a/src/client/util/LinkManager.ts b/src/client/util/LinkManager.ts index 223f0e7ef..c7c45ec61 100644 --- a/src/client/util/LinkManager.ts +++ b/src/client/util/LinkManager.ts @@ -200,7 +200,7 @@ export class LinkManager { // finds the opposite anchor of a given anchor in a link //TODO This should probably return undefined if there isn't an opposite anchor //TODO This should also await the return value of the anchor so we don't filter out promises - public getOppositeAnchor(linkDoc: Doc, anchor: Doc): Doc | undefined { + public static getOppositeAnchor(linkDoc: Doc, anchor: Doc): Doc | undefined { const a1 = Cast(linkDoc.anchor1, Doc, null); const a2 = Cast(linkDoc.anchor2, Doc, null); if (Doc.AreProtosEqual(anchor, a1)) return a2; |
