Update node size logic node expansion
This commit is contained in:
@@ -782,13 +782,9 @@ const useLightrangeGraph = () => {
|
|||||||
Constants.minNodeSize + scale * Math.pow((limitedDegree - minDegree) / range, 0.5)
|
Constants.minNodeSize + scale * Math.pow((limitedDegree - minDegree) / range, 0.5)
|
||||||
);
|
);
|
||||||
|
|
||||||
const currentSize = sigmaGraph.getNodeAttribute(nodeId, 'size');
|
|
||||||
|
|
||||||
if (newSize > currentSize) {
|
|
||||||
sigmaGraph.setNodeAttribute(nodeId, 'size', newSize);
|
sigmaGraph.setNodeAttribute(nodeId, 'size', newSize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Helper function to update edge sizes
|
// Helper function to update edge sizes
|
||||||
|
Reference in New Issue
Block a user