Open axelpale opened 7 months ago
It does not help either that Viewport does not implement any "hasControl" method nor Component any "hasChild" method.
Current workaround is:
try {
viewport.removeControl(alreadyRemovedControl)
} catch (e) {
// noop
}
If the client tries to remove a Control that is not yet added to a viewport, currently that throws an error. Maybe such removal should be okay and silent. Think of the removal as an idempotent operation. Is addition already an idempotent operation if the component is already added to the same parent?