include lines when finding total size

This commit is contained in:
Ian Gulliver
2019-07-07 21:31:59 +00:00
parent ab28ef5909
commit f6dba7bfa7

View File

@@ -150,6 +150,14 @@ class Layout {
max[i] = Math.max(max[i], groupMax[i]);
}
}
for (let link of this.links_) {
for (let hop of link.path) {
for (let i of [0, 1]) {
min[i] = Math.min(min[i], hop[i]);
max[i] = Math.max(max[i], hop[i]);
}
}
}
// Offset is negative minimum, e.g min -1 means +1 to all values
for (let node of this.nodes_) {
for (let i of [0, 1]) {