MCPcopy
hub / github.com/jipegit/OSXAuditor / position

Function position

d3-3.2.8/d3.js:5640–5644  ·  view source on GitHub ↗
(dimension, size)

Source from the content-addressed store, hash-verified

5638 charges = [];
5639 if (typeof charge === "function") for (i = 0; i < n; ++i) charges[i] = +charge.call(this, nodes[i], i); else for (i = 0; i < n; ++i) charges[i] = charge;
5640 function position(dimension, size) {
5641 var neighbors = neighbor(i), j = -1, m = neighbors.length, x;
5642 while (++j < m) if (!isNaN(x = neighbors[j][dimension])) return x;
5643 return Math.random() * size;
5644 }
5645 function neighbor() {
5646 if (!neighbors) {
5647 neighbors = [];

Callers 6

dragstartFunction · 0.85
movedFunction · 0.85
d3.jsFile · 0.85
partitionFunction · 0.85
squarifyFunction · 0.85
stickifyFunction · 0.85

Calls 2

neighborFunction · 0.85
roundFunction · 0.85

Tested by

no test coverage detected