From b3aa4a5b0bbbb87d041b9515bddedbcbf8ae9fc5 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 8 Aug 2025 12:54:45 -0400
Subject: fixed sizing of arrows and dashes to relate to stroke width.  Made
 link's use fill to set color and default to backgorundColor

---
 src/client/views/nodes/LinkBox.tsx | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/client/views/nodes/LinkBox.tsx')

diff --git a/src/client/views/nodes/LinkBox.tsx b/src/client/views/nodes/LinkBox.tsx
index d31fadf77..88e327a09 100644
--- a/src/client/views/nodes/LinkBox.tsx
+++ b/src/client/views/nodes/LinkBox.tsx
@@ -164,13 +164,14 @@ export class LinkBox extends ViewBoxBaseComponent<FieldViewProps>() {
             }
             const highlight = this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.Highlighting) as { highlightStyle: string; highlightColor: string; highlightIndex: number; highlightStroke: boolean };
             const highlightColor = highlight?.highlightIndex ? highlight?.highlightColor : undefined;
-            const color = this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.Color) as string;
+            const color = this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.BackgroundColor) as string;
             const fontFamily = this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.FontFamily) as string;
             const fontSize = this._props.styleProvider?.(this.layoutDoc, this._props, StyleProp.FontSize) as number;
             const fontColor = (c => (c !== 'transparent' ? c : undefined))(StrCast(this.layoutDoc.link_fontColor));
             const { stroke_markerScale: strokeMarkerScale, stroke_width: strokeRawWidth, stroke_startMarker: strokeStartMarker, stroke_endMarker: strokeEndMarker, stroke_dash: strokeDash } = this.Document;
 
             const strokeWidth = NumCast(strokeRawWidth, 1);
+            const strokeDashLen = strokeDash ? Number(strokeDash) * strokeWidth : undefined;
             const linkDesc = StrCast(this.dataDoc.link_description) || ' ';
             const labelText = linkDesc.substring(0, 50) + (linkDesc.length > 50 ? '...' : '');
             return (
@@ -195,7 +196,7 @@ export class LinkBox extends ViewBoxBaseComponent<FieldViewProps>() {
                         start={aid}
                         end={bid} //
                         strokeWidth={strokeWidth}
-                        dashness={!!Number(strokeDash)}
+                        dashness={!strokeDashLen ? undefined : { strokeLen: strokeDashLen, nonStrokeLen: strokeDashLen }}
                         showHead={!!strokeStartMarker}
                         showTail={!!strokeEndMarker}
                         headSize={NumCast(strokeMarkerScale, 3)}
@@ -299,7 +300,7 @@ Docs.Prototypes.TemplateMap.set(DocumentType.LINK, {
         _width: 1,
         link: '',
         link_description: '',
-        color: 'lightBlue', // lightblue is default color for linking dot and link documents text comment area
+        backgroundColor: 'lightBlue', // lightblue is default color for linking dot and link documents text comment area
         _dropPropertiesToRemove: new List(['onClick']),
     },
 });
-- 
cgit v1.2.3-70-g09d2

