fix: stroke color not working unless path is specified

i found this issue testing encoded paths. If width is not specifed, stroke color does not work

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
This commit is contained in:
Andrew Calcutt 2023-09-26 23:38:27 -04:00
parent eac048977f
commit 186623bfa4

View file

@ -511,8 +511,8 @@ const drawPath = (ctx, path, query, pathQuery, z) => {
if ('stroke' in query) {
ctx.strokeStyle = query.stroke;
}
// Path Width gets higher priority
if (pathHasWidth) {
// Path Stroke gets higher priority
if (pathHasStroke) {
ctx.strokeStyle = splitPaths
.find((x) => x.startsWith('stroke:'))
.replace('stroke:', '');