defaultNodeMass returns NaN and Node mass should be a number is thrown
|
return 1 + links.length / 3.0; |
seems that links does not have length but size, as newer graph.getLinks does not return array anymore
as a temporary workaround nodeMass function in physicsSettings helps..
nodeMass : (nodeId) => {
const links = graph.getLinks(nodeId);
if (links && links.length) return 1 + links.length / 3.0;
else if (links && links.size) return 1 + links.size / 3.0;
else return 1
}
defaultNodeMass returns NaN and Node mass should be a number is thrown
ngraph.forcelayout/index.js
Line 388 in f1c47b5
seems that links does not have length but size, as newer graph.getLinks does not return array anymore
as a temporary workaround nodeMass function in physicsSettings helps..