Skip to content

Commit

Permalink
fix(2d): fix Line cache (#232)
Browse files Browse the repository at this point in the history
Lines with bigger widths no longer get clipped when the node is cached.

Closes: #205
  • Loading branch information
aarthificial committed Feb 7, 2023
1 parent fa97d6c commit a953b64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/2d/src/components/Line.ts
Expand Up @@ -229,7 +229,7 @@ export class Line extends Shape {
const rect = this.childrenRect();
const arrowSize = this.arrowSize();
const lineWidth = this.lineWidth();
return rect.expand(Math.max(0, arrowSize - lineWidth / 2));
return rect.expand(Math.max(0, arrowSize, lineWidth / 2));
}

protected override drawShape(context: CanvasRenderingContext2D) {
Expand Down

0 comments on commit a953b64

Please sign in to comment.