* Save the initial position/size of all nodes to track real dirty state. * This creates a snapshot of current positions that can be restored later. * * Note: Should be called right after change events and before move/resize operations. * * @returns the engine instance for chaining
()
| 677 | * @internal |
| 678 | */ |
| 679 | public saveInitial(): GridStackEngine { |
| 680 | this.nodes.forEach(n => { |
| 681 | n._orig = Utils.copyPos({}, n); |
| 682 | delete n._dirty; |
| 683 | }); |
| 684 | this._hasLocked = this.nodes.some(n => n.locked); |
| 685 | return this; |
| 686 | } |
| 687 | |
| 688 | /** |
| 689 | * Restore all nodes back to their initial values. |
no test coverage detected