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

Method moveNode

src/gridstack.ts:1625–1634  ·  view source on GitHub ↗
(n: GridStackNode, m: GridStackMoveOpts)

Source from the content-addressed store, hash-verified

1623 }
1624
1625 private moveNode(n: GridStackNode, m: GridStackMoveOpts) {
1626 const wasUpdating = n._updating;
1627 if (!wasUpdating) this.engine.cleanNodes().beginUpdate(n);
1628 this.engine.moveNode(n, m);
1629 this._updateContainerHeight();
1630 if (!wasUpdating) {
1631 this._triggerChangeEvent();
1632 this.engine.endUpdate();
1633 }
1634 }
1635
1636 /**
1637 * Updates widget height to match the content height to avoid vertical scrollbars or dead space.

Callers 4

loadMethod · 0.95
updateMethod · 0.95
resizeToContentMethod · 0.45

Calls 5

_triggerChangeEventMethod · 0.95
beginUpdateMethod · 0.80
cleanNodesMethod · 0.80
endUpdateMethod · 0.80

Tested by

no test coverage detected