You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's difficult to have a good understanding of your issue without further info, and a simple functional reproducing example. Could you please create one on https://codepen.io/ or https://codesandbox.io/ ?
ForceGraph2D(action: string) {
const N: any = this.gData['nodes'].length;
if (N > 0) {
const graphDiv: any = document.getElementById('graph');
this.Graph = ForceGraph()(graphDiv);
// Add collision and bounding box forces
this.Graph.nodeVal((d: any) => {
return d.nodeSize})
.width(graphDiv.offsetWidth + 15)
.height(graphDiv.offsetHeight)
.d3Force('collide', d3.forceCollide(2))
.d3Force('box', () => {
const SQUARE_HALF_SIDE: any = this.Graph.nodeVal() * N * 0.8;
this.gData['nodes'].forEach((node: any) => {
const x = node['x'] || 0, y = node['y'] || 0;
// bounce on box walls
console.log(node);
}
The text was updated successfully, but these errors were encountered: