Delete deletes this node from its parent's children list and then destroys itself.
()
| 383 | // Delete deletes this node from its parent's children list |
| 384 | // and then destroys itself. |
| 385 | func (n *NodeBase) Delete() { |
| 386 | if n.Parent == nil { |
| 387 | n.This.Destroy() |
| 388 | } else { |
| 389 | n.Parent.AsTree().DeleteChild(n.This) |
| 390 | } |
| 391 | } |
| 392 | |
| 393 | // Destroy recursively deletes and destroys the node, all of its children, |
| 394 | // and all of its children's children, etc. |
no test coverage detected