Skip to content

Commit

Permalink
Change borderCapStyle and borderJoinStyle defaults to be compatible w…
Browse files Browse the repository at this point in the history
…ith 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
  • Loading branch information
mlohbihler authored Sep 25, 2024
1 parent 7e09105 commit 8bd8a3e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/helpers.canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export function translate(ctx, {x, y}, rotation) {
*/
export function setBorderStyle(ctx, options) {
if (options && options.borderWidth) {
ctx.lineCap = options.borderCapStyle;
ctx.lineCap = options.borderCapStyle || 'butt';
ctx.setLineDash(options.borderDash);
ctx.lineDashOffset = options.borderDashOffset;
ctx.lineJoin = options.borderJoinStyle;
ctx.lineJoin = options.borderJoinStyle || 'miter';
ctx.lineWidth = options.borderWidth;
ctx.strokeStyle = options.borderColor;
return true;
Expand Down

0 comments on commit 8bd8a3e

Please sign in to comment.