MCPcopy Index your code
hub / github.com/csev/py4e / position

Function position

code/pagerank/d3.v2.js:5330–5337  ·  view source on GitHub ↗
(dimension, size)

Source from the content-addressed store, hash-verified

5328
5329 // initialize node position based on first neighbor
5330 function position(dimension, size) {
5331 var neighbors = neighbor(i),
5332 j = -1,
5333 m = neighbors.length,
5334 x;
5335 while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
5336 return Math.random() * size;
5337 }
5338
5339 // initialize neighbors lazily
5340 function neighbor() {

Callers 4

d3.v2.jsFile · 0.70
partitionFunction · 0.70
squarifyFunction · 0.70
stickifyFunction · 0.70

Calls 2

neighborFunction · 0.70
roundFunction · 0.70

Tested by

no test coverage detected