MCPcopy Index your code
hub / github.com/react-grid-layout/react-grid-layout / layoutsMatch

Function layoutsMatch

test/spec/fast-compactor-test.js:312–320  ·  view source on GitHub ↗
(layout1, layout2)

Source from the content-addressed store, hash-verified

310
311 // Helper to check if layouts have same items at same positions
312 function layoutsMatch(layout1, layout2) {
313 if (layout1.length !== layout2.length) return false;
314 for (const item1 of layout1) {
315 const item2 = layout2.find(l => l.i === item1.i);
316 if (!item2) return false;
317 if (item1.x !== item2.x || item1.y !== item2.y) return false;
318 }
319 return true;
320 }
321
322 it("produces same result as standard compactor for simple grid layouts", () => {
323 const layout = generateGridLayout(20, 12);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…