I'm using SVG.js and want to draw an invisible border around a shape.
I use the stroke() method to do this, and I thought just setting the opacity option to 0 would work fine, but the problem is that it doesn't let me change the width of it. The stroke is always width 1 even when I try to increase it and create a larger invisible border.
Am I doing this wrong or is there a better way to do this?
draw
.polygon(corners.map(({ x, y }) => `${x},${y}`))
.opacity(1)
.fill("white")
.stroke({ width: STROKE_WIDTH, color: STROKE_COLOR, opacity: 0 })
.translate(x, y);