aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-04-01 14:07:05 -0400
committerbobzel <zzzman@gmail.com>2024-04-01 14:07:05 -0400
commit0a02dfa252f4eee451ba4ea74f82b90be489687e (patch)
tree41513cc3844a26200a580a45abc24c4e5ee1797d /src
parentf9cfc0a562364380aeb703d3a5bd4ea4d060882c (diff)
fixed exceptions on link to link positions
Diffstat (limited to 'src')
-rw-r--r--src/client/documents/Documents.ts8
-rw-r--r--src/client/views/linking/LinkMenuItem.tsx2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 20e74a3e1..29ec1d19e 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -1517,8 +1517,8 @@ export namespace DocUtils {
return linkDoc;
});
- const a = source.layout_unrendered ? 'link_anchor_1.annotationOn' : 'link_anchor_1';
- const b = target.layout_unrendered ? 'link_anchor_2.annotationOn' : 'link_anchor_2';
+ const a = source.layout_unrendered ? 'link_anchor_1?.annotationOn' : 'link_anchor_1';
+ const b = target.layout_unrendered ? 'link_anchor_2?.annotationOn' : 'link_anchor_2';
return makeLink(
Docs.Create.LinkDocument(
@@ -1533,8 +1533,8 @@ export namespace DocUtils {
link_displayLine: linkSettings.link_displayLine,
link_relationship: linkSettings.link_relationship,
link_description: linkSettings.link_description,
- x: ComputedField.MakeFunction(`(this.${a}.x+this.${b}.x)/2`) as any,
- y: ComputedField.MakeFunction(`(this.${a}.y+this.${b}.y)/2`) as any,
+ x: ComputedField.MakeFunction(`((this.${a}?.x||0)+(this.${b}?.x||0))/2`) as any,
+ y: ComputedField.MakeFunction(`((this.${a}?.y||0)+(this.${b}?.y||0))/2`) as any,
link_autoMoveAnchors: true,
_lockedPosition: true,
_layout_showCaption: '', // removed since they conflict with showing a link with a LinkBox (ie, line, not comparison box)
diff --git a/src/client/views/linking/LinkMenuItem.tsx b/src/client/views/linking/LinkMenuItem.tsx
index 81dd0eb98..a2c9d10b6 100644
--- a/src/client/views/linking/LinkMenuItem.tsx
+++ b/src/client/views/linking/LinkMenuItem.tsx
@@ -183,7 +183,7 @@ export class LinkMenuItem extends ObservableReactComponent<LinkMenuItemProps> {
</div>
</Tooltip>
<Tooltip disableInteractive={true} title={<div className="dash-tooltip">Show/Hide Link</div>}>
- <div title="click to show link" className="linkMenu-icon-wrapper" onPointerDown={this.onIconDown}>
+ <div className="linkMenu-icon-wrapper" onPointerDown={this.onIconDown}>
<FontAwesomeIcon className="linkMenu-icon" icon={destinationIcon} size="sm" />
</div>
</Tooltip>