1295 Handling labels of clusters

This commit is contained in:
Knut Sveidqvist
2020-03-11 20:25:55 +01:00
parent 7bd5529bb7
commit da048cbc7b
4 changed files with 29 additions and 15 deletions

View File

@@ -22,16 +22,16 @@ export const render = (elem, graph) => {
if (node.type !== 'group') {
insertNode(nodes, graph.node(v));
} else {
const width = getClusterTitleWidth(clusters, node);
const children = graph.children(v);
nodes2expand.push({ id: children[0], width });
// const width = getClusterTitleWidth(clusters, node);
// const children = graph.children(v);
// nodes2expand.push({ id: children[0], width });
}
});
nodes2expand.forEach(item => {
const node = graph.node(item.id);
node.width = item.width;
});
// nodes2expand.forEach(item => {
// const node = graph.node(item.id);
// node.width = item.width;
// });
// Inster labels, this will insert them into the dom so that the width can be calculated
graph.edges().forEach(function(e) {