Skip to content

Commit 757fa94

Browse files
authored
Merge pull request #65 from Naeemo/master
fix: fill and stroke are not mutually exclusive.
2 parents f7f7327 + 749cdc4 commit 757fa94

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/player/render.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ function drawBezier (
185185
})
186186
if (styles.fill !== null) {
187187
context.fill()
188-
} else if (styles.stroke !== null) {
188+
}
189+
if (styles.stroke !== null) {
189190
context.stroke()
190191
}
191192
context.restore()
@@ -353,7 +354,8 @@ function drawEllipse (
353354
context.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym)
354355
if (styles.fill !== null) {
355356
context.fill()
356-
} else if (styles.stroke !== null) {
357+
}
358+
if (styles.stroke !== null) {
357359
context.stroke()
358360
}
359361
context.restore()
@@ -397,7 +399,8 @@ function drawRect (
397399
context.closePath()
398400
if (styles.fill !== null) {
399401
context.fill()
400-
} else if (styles.stroke !== null) {
402+
}
403+
if (styles.stroke !== null) {
401404
context.stroke()
402405
}
403406
context.restore()

0 commit comments

Comments
 (0)