diff options
author | bobzel <zzzman@gmail.com> | 2024-04-01 14:07:05 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-04-01 14:07:05 -0400 |
commit | 0a02dfa252f4eee451ba4ea74f82b90be489687e (patch) | |
tree | 41513cc3844a26200a580a45abc24c4e5ee1797d /src/client/documents/Documents.ts | |
parent | f9cfc0a562364380aeb703d3a5bd4ea4d060882c (diff) |
fixed exceptions on link to link positions
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r-- | src/client/documents/Documents.ts | 8 |
1 files changed, 4 insertions, 4 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) |