From 39a4e8107f659a9c1f1374482d12ba9f7a1bc5e4 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 16 May 2023 21:21:03 -0400 Subject: updated some ink field names --- src/client/views/InkingStroke.tsx | 18 +++++++++--------- src/client/views/PropertiesView.tsx | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx index 3a8cec07e..545e20ed1 100644 --- a/src/client/views/InkingStroke.tsx +++ b/src/client/views/InkingStroke.tsx @@ -318,7 +318,7 @@ export class InkingStroke extends ViewBoxBaseComponent() { const startMarker = StrCast(this.layoutDoc.stroke_startMarker); const endMarker = StrCast(this.layoutDoc.stroke_endMarker); - const markerScale = NumCast(this.layoutDoc.strokeMarkerScale); + const markerScale = NumCast(this.layoutDoc.stroke_markerScale); return SnappingManager.GetIsDragging() ? null : !InkStrokeProperties.Instance._controlButton ? ( !this.props.isSelected() || InkingStroke.IsClosed(inkData) ? null : (
@@ -334,8 +334,8 @@ export class InkingStroke extends ViewBoxBaseComponent() { Colors.MEDIUM_BLUE, screenInkWidth[0], screenSpaceCenterlineStrokeWidth, - StrCast(inkDoc.strokeLineJoin), - StrCast(this.layoutDoc.strokeLineCap), + StrCast(inkDoc.stroke_lineJoin), + StrCast(this.layoutDoc.stroke_lineCap), StrCast(inkDoc.stroke_bezier), 'none', startMarker, @@ -363,7 +363,7 @@ export class InkingStroke extends ViewBoxBaseComponent() { const startMarker = StrCast(this.layoutDoc.stroke_startMarker); const endMarker = StrCast(this.layoutDoc.stroke_endMarker); - const markerScale = NumCast(this.layoutDoc.strokeMarkerScale, 1); + const markerScale = NumCast(this.layoutDoc.stroke_markerScale, 1); const closed = InkingStroke.IsClosed(inkData); const isInkMask = BoolCast(this.layoutDoc.stroke_isInkMask); const fillColor = isInkMask ? DashColor(StrCast(this.layoutDoc.fillColor, 'transparent')).blacken(0).rgb().toString() : this.props.styleProvider?.(this.rootDoc, this.props, StyleProp.FillColor) ?? 'transparent'; @@ -385,8 +385,8 @@ export class InkingStroke extends ViewBoxBaseComponent() { strokeColor, inkStrokeWidth, inkStrokeWidth, - StrCast(this.layoutDoc.strokeLineJoin), - StrCast(this.layoutDoc.strokeLineCap), + StrCast(this.layoutDoc.stroke_lineJoin), + StrCast(this.layoutDoc.stroke_lineCap), StrCast(this.layoutDoc.stroke_bezier), !closed ? 'none' : fillColor === 'transparent' ? 'none' : fillColor, startMarker, @@ -402,7 +402,7 @@ export class InkingStroke extends ViewBoxBaseComponent() { ); const highlight = !this.controlUndo && this.props.styleProvider?.(this.rootDoc, this.props, StyleProp.Highlighting); const highlightIndex = highlight?.highlightIndex; - const highlightColor = highlight?.highlightIndex ? highlight?.highlightColor : StrCast(this.layoutDoc.strokeOutlineColor, !closed && fillColor && fillColor !== 'transparent' ? StrCast(this.layoutDoc.color, 'transparent') : 'transparent'); + const highlightColor = highlight?.highlightIndex ? highlight?.highlightColor : StrCast(this.layoutDoc.stroke_outlineColor, !closed && fillColor && fillColor !== 'transparent' ? StrCast(this.layoutDoc.color, 'transparent') : 'transparent'); // Invisible polygonal line that enables the ink to be selected by the user. const clickableLine = (downHdlr?: (e: React.PointerEvent) => void, suppressFill: boolean = false, mask: boolean = false) => InteractionUtils.CreatePolyline( @@ -412,8 +412,8 @@ export class InkingStroke extends ViewBoxBaseComponent() { highlightColor, inkStrokeWidth, inkStrokeWidth + (fillColor ? (closed ? 2 : (highlightIndex ?? 0) + 2) : 2), - StrCast(this.layoutDoc.strokeLineJoin), - StrCast(this.layoutDoc.strokeLineCap), + StrCast(this.layoutDoc.stroke_lineJoin), + StrCast(this.layoutDoc.stroke_lineCap), StrCast(this.layoutDoc.stroke_bezier), !closed ? 'none' : !isInkMask && (fillColor === 'transparent' || suppressFill) ? 'none' : fillColor, '', diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 297820e37..75514a090 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -826,7 +826,7 @@ export class PropertiesView extends React.Component { return this.getField('stroke_width') || '1'; } @computed get markScal() { - return Number(this.getField('strokeMakerScale') || '1'); + return Number(this.getField('stroke_markerScale') || '1'); } @computed get markHead() { return this.getField('stroke_startMarker') || ''; @@ -843,7 +843,7 @@ export class PropertiesView extends React.Component { this.selectedDoc && (this.selectedDoc.stroke_dash = value ? this._lastDash : undefined); } set markScal(value) { - this.selectedDoc && (this.selectedDoc.strokeMarkerScale = Number(value)); + this.selectedDoc && (this.selectedDoc.stroke_markerScale = Number(value)); } set widthStk(value) { this.selectedDoc && (this.selectedDoc.stroke_width = Number(value)); -- cgit v1.2.3-70-g09d2