Skip to content

Commit

Permalink
Don't try to draw arrows into trimmed nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn committed May 13, 2024
1 parent b1cc15a commit bd12d4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tree/draw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ class TreeDrawer {
this.ctx.lineWidth = 1;
for (const [i, j] of this.arrows) {
this.ctx.beginPath();
const start = this.locations.get(i)!;
const end = this.locations.get(j)!;
const start = this.locations.get(i);
const end = this.locations.get(j);
if (!start || !end) continue;
const x0 = start.x - start.width / 2;
const y0 = Math.max(end.y + 50, start.y + 20);
const x1 = end.x;
Expand Down

0 comments on commit bd12d4c

Please sign in to comment.