removeSubtree static method
Removes the subtree rooted at id (node + descendants).
Returns doc unchanged if id not found.
Implementation
static CanvasSceneDocument removeSubtree(
CanvasSceneDocument doc,
ElementId id,
) {
final pr = findParentOf(doc, id);
if (pr == null) return doc;
return _removeAtParentRef(doc, pr);
}