Skip to content

Commit 5792398

Browse files
authored
add strokeDash support for svg generation (#54)
1 parent cb9bec7 commit 5792398

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/getSvgFromGraphicsObject.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,11 @@ export function getSvgFromGraphicsObject(
178178
? line.strokeWidth * matrix.a
179179
: 1
180180
).toString(),
181+
...(line.strokeDash && {
182+
"stroke-dasharray": Array.isArray(line.strokeDash)
183+
? line.strokeDash.join(" ")
184+
: line.strokeDash,
185+
}),
181186
},
182187
})),
183188
// Rectangles

0 commit comments

Comments
 (0)