Skip to content

Commit 8bd8a3e

Browse files
authored
Change borderCapStyle and borderJoinStyle defaults to be compatible with SKIA canvas (#939)
* Fix defaults for skia canvas * workflow dispatch * Include properties in arrowhead defaults, but leave undefined * Undo auto-formatting * Replace changes with single helper change * Remove undefined settings too
1 parent 7e09105 commit 8bd8a3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/helpers/helpers.canvas.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ export function translate(ctx, {x, y}, rotation) {
4949
*/
5050
export function setBorderStyle(ctx, options) {
5151
if (options && options.borderWidth) {
52-
ctx.lineCap = options.borderCapStyle;
52+
ctx.lineCap = options.borderCapStyle || 'butt';
5353
ctx.setLineDash(options.borderDash);
5454
ctx.lineDashOffset = options.borderDashOffset;
55-
ctx.lineJoin = options.borderJoinStyle;
55+
ctx.lineJoin = options.borderJoinStyle || 'miter';
5656
ctx.lineWidth = options.borderWidth;
5757
ctx.strokeStyle = options.borderColor;
5858
return true;

0 commit comments

Comments
 (0)