Skip to content

Commit 933de14

Browse files
committed
#10 Fix: Graph width not including paths extending past the rightmost node.
1 parent 833c3d4 commit 933de14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

web/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,10 @@
420420
private getWidth() {
421421
let x = 0, i, p;
422422
for (i = 0; i < this.nodes.length; i++) {
423-
p = this.nodes[i].getPoint();
423+
p = this.nodes[i].getNextPoint();
424424
if (p.x > x) x = p.x;
425425
}
426-
return (x + 1) * this.config.grid.x;
426+
return x * this.config.grid.x;
427427
}
428428
private getHeight() {
429429
return this.nodes.length * this.config.grid.y + (this.expandedCommit !== null ? expandedCommitHeight : 0);

0 commit comments

Comments
 (0)