diff options
author | bobzel <zzzman@gmail.com> | 2021-02-09 03:03:48 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-02-09 03:03:48 -0500 |
commit | 0f03183b9a2374ed3198d2b9ec8348fa819b11b4 (patch) | |
tree | c0acfb9869f3ea768f2574f3eda1592fa3a30ad4 /src/fields/Doc.ts | |
parent | 0e5891eab7f53697b764b7e9da5163db0351a0a2 (diff) |
fixed drawing link lines between everything except textanchor - to - textanchor.
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r-- | src/fields/Doc.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index e1ab1d3d3..56b2db48e 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -958,9 +958,10 @@ export namespace Doc { return doc; } - - export function LinkOtherAnchor(linkDoc: Doc, anchorDoc: Doc) { return Doc.AreProtosEqual(anchorDoc, Cast(linkDoc.anchor1, Doc) as Doc) ? Cast(linkDoc.anchor2, Doc) as Doc : Cast(linkDoc.anchor1, Doc) as Doc; } - export function LinkEndpoint(linkDoc: Doc, anchorDoc: Doc) { return Doc.AreProtosEqual(anchorDoc, Cast(linkDoc.anchor1, Doc) as Doc) ? "1" : "2"; } + export function LinkEndpoint(linkDoc: Doc, anchorDoc: Doc) { + return Doc.AreProtosEqual(anchorDoc, (linkDoc.anchor1 as Doc).annotationOn as Doc) || + Doc.AreProtosEqual(anchorDoc, linkDoc.anchor1 as Doc) ? "1" : "2"; + } export function linkFollowUnhighlight() { Doc.UnhighlightAll(); |