Allow stroke width to go to 0. Fixes #14.

pull/23/head
Atul Varma 2021-02-20 11:41:41 -05:00
rodzic 6f71305dd2
commit 5c903c0794
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -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";
}

Wyświetl plik

@ -42,7 +42,7 @@ export const SymbolContextWidget: React.FC<{
<label htmlFor="strokeWidth">Stroke width: </label>
<input
type="range"
min={0.5}
min={0}
max={3}
step={0.1}
value={ctx.uniformStrokeWidth}