MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / samePos

Method samePos

src/utils.ts:489–491  ·  view source on GitHub ↗

true if a and b has same size & position

(a: GridStackPosition, b: GridStackPosition)

Source from the content-addressed store, hash-verified

487
488 /** true if a and b has same size & position */
489 static samePos(a: GridStackPosition, b: GridStackPosition): boolean {
490 return a && b && a.x === b.x && a.y === b.y && (a.w || 1) === (b.w || 1) && (a.h || 1) === (b.h || 1);
491 }
492
493 /** given a node, makes sure it's min/max are valid */
494 static sanitizeMinMax(node: GridStackNode) {

Callers 7

_fixCollisionsMethod · 0.80
nodeBoundFixMethod · 0.80
getDirtyNodesMethod · 0.80
restoreInitialMethod · 0.80
moveNodeMethod · 0.80
loadMethod · 0.80
utils-spec.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected