Skip to content

Commit 1d47cef

Browse files
committed
fixes #66
1 parent 50e694e commit 1d47cef

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/app/scripts/import/SvgLoader.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,17 +181,21 @@ export function loadVectorLayerFromSvgString(svgString: string): VectorLayer {
181181
('fillColor' in context) ? ColorUtil.svgToAndroidColor(context.fillColor) : '#ff000000';
182182
const strokeColor =
183183
('strokeColor' in context) ? ColorUtil.svgToAndroidColor(context.strokeColor) : undefined;
184+
const fillAlpha = ('fillAlpha' in context) ? context.fillAlpha : 1;
185+
const strokeWidth = ('strokeWidth' in context) ? context.strokeWidth : 1;
186+
const strokeAlpha = ('strokeAlpha' in context) ? context.strokeAlpha : 1;
187+
const strokeMiterLimit = ('strokeMiterLimit' in context) ? context.strokeMiterLimit : 4;
184188
return new PathLayer(
185189
makeFinalNodeIdFn(node, 'path'),
186190
pathData,
187191
fillColor,
188-
('fillAlpha' in context) ? context.fillAlpha : undefined,
192+
fillAlpha,
189193
strokeColor,
190-
('strokeAlpha' in context) ? context.strokeAlpha : undefined,
191-
context.strokeWidth || undefined,
192-
context.strokeLinecap || undefined,
193-
context.strokeLinejoin || undefined,
194-
context.strokeMiterLimit || undefined,
194+
strokeAlpha,
195+
strokeWidth,
196+
context.strokeLinecap || 'butt',
197+
context.strokeLinejoin || 'miter',
198+
strokeMiterLimit,
195199
);
196200
}
197201

0 commit comments

Comments
 (0)