MCPcopy Create free account
hub / github.com/chartbrew/chartbrew / rectanglesOverlap

Function rectanglesOverlap

client/src/modules/autoLayout.js:8–14  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

6}
7
8function rectanglesOverlap(a, b) {
9 const ax2 = a.x + a.w;
10 const ay2 = a.y + a.h;
11 const bx2 = b.x + b.w;
12 const by2 = b.y + b.h;
13 return !(ax2 <= b.x || bx2 <= a.x || ay2 <= b.y || by2 <= a.y);
14}
15
16function clampItemToGrid(item, bpCols) {
17 const clamped = cloneDeep(item);

Callers 4

findLeftmostXFunction · 0.70
moveUpFunction · 0.70
placeGreedyFunction · 0.70
placeNewWidgetFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected