mirror of
https://github.com/litruv/lit.ruv.wtf.git
synced 2026-07-24 10:46:03 +10:00
can now add nodes
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user