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

Method sanitizeMinMax

src/utils.ts:494–500  ·  view source on GitHub ↗

given a node, makes sure it's min/max are valid

(node: GridStackNode)

Source from the content-addressed store, hash-verified

492
493 /** given a node, makes sure it's min/max are valid */
494 static sanitizeMinMax(node: GridStackNode) {
495 // remove 0, undefine, null
496 if (!node.minW) { delete node.minW; }
497 if (!node.minH) { delete node.minH; }
498 if (!node.maxW) { delete node.maxW; }
499 if (!node.maxH) { delete node.maxH; }
500 }
501
502 /** removes field from the first object if same as the second objects (like diffing) and internal '_' for saving */
503 static removeInternalAndSame(a: unknown, b: unknown):void {

Callers 3

prepareNodeMethod · 0.80
updateMethod · 0.80
utils-spec.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected