diff options
author | bobzel <zzzman@gmail.com> | 2023-06-22 21:15:24 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-06-22 21:15:24 -0400 |
commit | b599b69dd0892de1b98807a7f8b4a8badcd8abe0 (patch) | |
tree | 2740922bb0be327629c3241e3e245a0d48bd8ca3 /src/client/util/LinkManager.ts | |
parent | 5c32758dbc26a0c0e034d878e9dff633061dc2c6 (diff) |
fixed placement of link preview in sidebar to be on screen. got rid of transition for display doc border on hover. fixed showing link targets in menu when source is an annotation. fixed crashes when their is no context path for a showDocument
Diffstat (limited to 'src/client/util/LinkManager.ts')
-rw-r--r-- | src/client/util/LinkManager.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/util/LinkManager.ts b/src/client/util/LinkManager.ts index 3aa72f501..ce422f849 100644 --- a/src/client/util/LinkManager.ts +++ b/src/client/util/LinkManager.ts @@ -194,10 +194,8 @@ export class LinkManager { public static getOppositeAnchor(linkDoc: Doc, anchor: Doc): Doc | undefined { const a1 = Cast(linkDoc.link_anchor_1, Doc, null); const a2 = Cast(linkDoc.link_anchor_2, Doc, null); - if (Doc.AreProtosEqual(anchor, a1)) return a2; - if (Doc.AreProtosEqual(anchor, a2)) return a1; - if (Doc.AreProtosEqual(anchor, a1.annotationOn as Doc)) return a2; - if (Doc.AreProtosEqual(anchor, a2.annotationOn as Doc)) return a1; + if (Doc.AreProtosEqual(DocCast(anchor.annotationOn, anchor), DocCast(a1.annotationOn, a1))) return a2; + if (Doc.AreProtosEqual(DocCast(anchor.annotationOn, anchor), DocCast(a2.annotationOn, a2))) return a1; if (Doc.AreProtosEqual(anchor, linkDoc)) return linkDoc; } } |