Closed lipedeitos closed 7 years ago
Hi @lipedeitos!
It was a while since I've used it but, from what I remember you need to also set the nodes width and height. Here's a snippet from the default function in Builder.js.
n.cHeight = height;
if (n.data.hidden) {
n.cWidth = 0;
} else {
n.cWidth = width;
}
Then you return the maximum of width and height.
/Erik
Hi Erik!
Could you please provide with an example of nodeSize callback function to set width and height for each or all nodes?
Hi Erik!
Sorry to bother you again. I'm trying to use the nodeSize function following the documentation but its not working, probably i'm doing something wrong.
nodeSize: function(nodes, width, textRenderer){ return [120,70]; },
Using this, console prints "Error:Cheers.