aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/LinkBox.tsx
diff options
context:
space:
mode:
authorA.J. Shulman <Shulman.aj@gmail.com>2025-05-11 10:46:15 -0400
committerA.J. Shulman <Shulman.aj@gmail.com>2025-05-11 10:46:15 -0400
commitb87b2105e966928518c96c7702b68c12344ffdd7 (patch)
tree84fd5ecede3af9d773c10d02908cdde27da1a759 /src/client/views/nodes/LinkBox.tsx
parent0db4583914e43e6efdba3e86a614a19956e73b5e (diff)
parent0c3f86d57225a2991920adef3a337bc13e408ac0 (diff)
Merge branch 'master' into agent-web-working
Diffstat (limited to 'src/client/views/nodes/LinkBox.tsx')
-rw-r--r--src/client/views/nodes/LinkBox.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/nodes/LinkBox.tsx b/src/client/views/nodes/LinkBox.tsx
index d5dc256d9..78c8a686c 100644
--- a/src/client/views/nodes/LinkBox.tsx
+++ b/src/client/views/nodes/LinkBox.tsx
@@ -128,6 +128,7 @@ export class LinkBox extends ViewBoxBaseComponent<FieldViewProps>() {
const getAnchor = (field: FieldResult): Element[] => {
const docField = DocCast(field);
const doc = docField?.layout_unrendered ? DocCast(docField.annotationOn, docField) : docField;
+ if (!doc) return [];
const ele = document.getElementById(DocumentView.UniquifyId(DocumentView.LightboxContains(this.DocumentView?.()), doc[Id]));
if (ele?.className === 'linkBox-label') foundParent = true;
if (ele?.getBoundingClientRect().width) return [ele];
@@ -252,7 +253,7 @@ export class LinkBox extends ViewBoxBaseComponent<FieldViewProps>() {
fontSize={fontSize}
GetValue={() => linkDesc}
SetValue={action(val => {
- this.Document[DocData].link_description = val;
+ this.Document.$link_description = val;
return true;
})}
/>
@@ -262,8 +263,8 @@ export class LinkBox extends ViewBoxBaseComponent<FieldViewProps>() {
background={color}
color={fontColor || lightOrDark(DashColor(color).fade(0.5).toString())}
type={Type.PRIM}
- val={StrCast(this.Document[DocData].link_description)}
- setVal={action(val => (this.Document[DocData].link_description = val))}
+ val={StrCast(this.Document.$link_description)}
+ setVal={action(val => (this.Document.$link_description = val))}
fillWidth
/> */}
</div>