can now add nodes

This commit is contained in:
2026-04-19 05:45:33 +10:00
parent 7e7e6f2c22
commit 34c2aa4316
23 changed files with 864 additions and 1 deletions

View File

@@ -680,6 +680,23 @@ export class ItemDragger {
this.#onActiveItemChange?.(id, pos);
}
/**
* Unregisters a node that's being deleted.
*
* @param {string} nodeId
*/
unregisterNode(nodeId) {
this.#itemPositions.delete(nodeId);
this.#applyTransform.delete(nodeId);
this.#dragRotation.delete(nodeId);
this.#dragOrigin.delete(nodeId);
// Clear active if it's the deleted node
if (this.#activeId === nodeId) {
this.clearSelection();
}
}
/**
* Clear the current selection
*/