MCPcopy
hub / github.com/csev/py4e / cloudBounds

Function cloudBounds

code/gmane/d3.layout.cloud.js:330–337  ·  view source on GitHub ↗
(bounds, d)

Source from the content-addressed store, hash-verified

328 }
329
330 function cloudBounds(bounds, d) {
331 var b0 = bounds[0],
332 b1 = bounds[1];
333 if (d.x + d.x0 < b0.x) b0.x = d.x + d.x0;
334 if (d.y + d.y0 < b0.y) b0.y = d.y + d.y0;
335 if (d.x + d.x1 > b1.x) b1.x = d.x + d.x1;
336 if (d.y + d.y1 > b1.y) b1.y = d.y + d.y1;
337 }
338
339 function collideRects(a, b) {
340 return a.x + a.x1 > b[0].x && a.x + a.x0 < b[1].x && a.y + a.y1 > b[0].y && a.y + a.y0 < b[1].y;

Callers 1

stepFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected