Allow stroke width to go to 0. Fixes #14.
rodzic
6f71305dd2
commit
5c903c0794
|
@ -72,7 +72,7 @@ function reactifySvgSymbolElement(
|
||||||
let vectorEffect;
|
let vectorEffect;
|
||||||
fill = getColor(ctx, fill);
|
fill = getColor(ctx, fill);
|
||||||
stroke = getColor(ctx, stroke);
|
stroke = getColor(ctx, stroke);
|
||||||
if (strokeWidth !== undefined && ctx.uniformStrokeWidth) {
|
if (strokeWidth !== undefined && typeof ctx.uniformStrokeWidth === "number") {
|
||||||
strokeWidth = ctx.uniformStrokeWidth;
|
strokeWidth = ctx.uniformStrokeWidth;
|
||||||
vectorEffect = "non-scaling-stroke";
|
vectorEffect = "non-scaling-stroke";
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ export const SymbolContextWidget: React.FC<{
|
||||||
<label htmlFor="strokeWidth">Stroke width: </label>
|
<label htmlFor="strokeWidth">Stroke width: </label>
|
||||||
<input
|
<input
|
||||||
type="range"
|
type="range"
|
||||||
min={0.5}
|
min={0}
|
||||||
max={3}
|
max={3}
|
||||||
step={0.1}
|
step={0.1}
|
||||||
value={ctx.uniformStrokeWidth}
|
value={ctx.uniformStrokeWidth}
|
||||||
|
|
Ładowanie…
Reference in New Issue