Avoid group label text with lines

This commit is contained in:
Ian Gulliver
2019-07-09 16:43:33 +00:00
parent 130a208bfc
commit 042fa66a1d
2 changed files with 19 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ class Layout {
this.resolveAffinity();
this.resolveGroups();
while (this.iterate());
this.addGroupPos();
this.drawLinks();
this.fixOrigin();
}
@@ -194,6 +195,20 @@ class Layout {
];
}
addGroupPos() {
for (let group of this.groups_) {
if (!group.hasGraphGroup()) {
continue;
}
let [min, max] = group.getMinMax();
for (let x = min[0]; x <= max[0]; ++x) {
for (let y = min[1]; y <= max[1]; ++y) {
getOrSet(this.nodesByPos_, [x, y], group);
}
}
}
}
drawLinks() {
let links = [];
for (let from of this.nodes_) {