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

Method getDirtyNodes

src/gridstack-engine.ts:636–642  ·  view source on GitHub ↗

* Returns a list of nodes that have been modified from their original values. * This is used to track which nodes need DOM updates. * * @param verify if true, performs additional verification by comparing current vs original positions * @returns array of nodes that have been modified

(verify?: boolean)

Source from the content-addressed store, hash-verified

634 * const verified = engine.getDirtyNodes(true);
635 */
636 public getDirtyNodes(verify?: boolean): GridStackNode[] {
637 // compare original x,y,w,h instead as _dirty can be a temporary state
638 if (verify) {
639 return this.nodes.filter(n => n._dirty && !Utils.samePos(n, n._orig));
640 }
641 return this.nodes.filter(n => n._dirty);
642 }
643
644 /** @internal call this to call onChange callback with dirty nodes so DOM can be updated */
645 protected _notify(removedNodes?: GridStackNode[]): GridStackEngine {

Callers 3

_notifyMethod · 0.95
_triggerChangeEventMethod · 0.80

Calls 1

samePosMethod · 0.80

Tested by

no test coverage detected