From 5c903c07946c3ce667306607672ed490dd8a7cfc Mon Sep 17 00:00:00 2001 From: Atul Varma Date: Sat, 20 Feb 2021 11:41:41 -0500 Subject: [PATCH] Allow stroke width to go to 0. Fixes #14. --- lib/svg-symbol.tsx | 2 +- lib/symbol-context-widget.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/svg-symbol.tsx b/lib/svg-symbol.tsx index 35d4ff1..e233a07 100644 --- a/lib/svg-symbol.tsx +++ b/lib/svg-symbol.tsx @@ -72,7 +72,7 @@ function reactifySvgSymbolElement( let vectorEffect; fill = getColor(ctx, fill); stroke = getColor(ctx, stroke); - if (strokeWidth !== undefined && ctx.uniformStrokeWidth) { + if (strokeWidth !== undefined && typeof ctx.uniformStrokeWidth === "number") { strokeWidth = ctx.uniformStrokeWidth; vectorEffect = "non-scaling-stroke"; } diff --git a/lib/symbol-context-widget.tsx b/lib/symbol-context-widget.tsx index a6befb9..ad2a57d 100644 --- a/lib/symbol-context-widget.tsx +++ b/lib/symbol-context-widget.tsx @@ -42,7 +42,7 @@ export const SymbolContextWidget: React.FC<{