Tag label rendering

This commit is contained in:
Ian Gulliver
2019-07-14 22:21:43 +00:00
parent 736d9604f3
commit 7ce2563781
4 changed files with 59 additions and 8 deletions

View File

@@ -183,6 +183,13 @@ class Layout {
min[1] -= 1;
}
for (let tag of this.tags_) {
if (tag.label) {
max[1] += 1;
break;
}
}
// Set a minimum size and center the smaller graph
const MIN_SIZE = 7;
for (let i of [0, 1]) {
@@ -301,6 +308,14 @@ class Layout {
steps.push(...link.getSteps());
}
let nextTagLabelPos = [
this.size[0] - 1,
this.size[1] - 1,
];
for (let tag of this.tags_) {
steps.push(...tag.getSteps(nextTagLabelPos));
}
return steps;
}
}