graphology-layout-forceatlas2
Advanced tools
Comparing version 0.10.1 to 0.11.0-rc1
{ | ||
"name": "graphology-layout-forceatlas2", | ||
"version": "0.10.1", | ||
"version": "0.11.0-rc1", | ||
"description": "ForceAtlas 2 layout algorithm for graphology.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -813,2 +813,3 @@ /** | ||
var data = event.data; | ||
var iterations = data.iterations; | ||
@@ -820,3 +821,3 @@ NODES = new Float32Array(data.nodes); | ||
// Running the iteration | ||
iterate(data.settings, NODES, EDGES); | ||
for (var i = 0; i < iterations; i++) iterate(data.settings, NODES, EDGES); | ||
@@ -823,0 +824,0 @@ // Sending result to supervisor |
@@ -10,3 +10,5 @@ import Graph, {Attributes} from 'graphology-types'; | ||
graph: Graph, | ||
params?: ForceAtlas2LayoutParameters<NodeAttributes, EdgeAttributes> | ||
params?: ForceAtlas2LayoutParameters<NodeAttributes, EdgeAttributes> & { | ||
backgroundIterations: number; | ||
} | ||
); | ||
@@ -13,0 +15,0 @@ |
@@ -50,2 +50,3 @@ /** | ||
this.settings = settings; | ||
this.backgroundIterations = params.backgroundIterations || 1; | ||
this.getEdgeWeight = getEdgeWeight; | ||
@@ -132,3 +133,4 @@ this.matrices = null; | ||
settings: this.settings, | ||
nodes: matrices.nodes.buffer | ||
nodes: matrices.nodes.buffer, | ||
iterations: this.backgroundIterations | ||
}; | ||
@@ -135,0 +137,0 @@ |
79022
1970