Tears the mobile toolbar down: removes the four nodes it appended to glMain,
disconnects its observer and drops its listeners.
Registered as a lifecycle teardown, so Core.destroy() runs it. Also called by
initMobileToolbar() when it finds a toolbar left over from a previous shell.
⚠️ Call it BEFORE the shell is destroyed, not after. The sheet moves shared nodes
(filter panel, legend, layer manager) into its body; this function gives them back,
but it can only give them back to a parent that still exists. A host that drops
.gl-main first has already lost them.
⚠️ Proximity mode is NOT cancelled. Clearing it would mean calling back into the
filter capability — a business effect on a teardown path — so the engine keeps
whatever filter was applied while the pill's own flag resets. A host that tears down
mid-proximity should cancel it itself first.
Tears the mobile toolbar down: removes the four nodes it appended to
glMain, disconnects its observer and drops its listeners.Registered as a lifecycle teardown, so
Core.destroy()runs it. Also called byinitMobileToolbar()when it finds a toolbar left over from a previous shell.⚠️ Call it BEFORE the shell is destroyed, not after. The sheet moves shared nodes (filter panel, legend, layer manager) into its body; this function gives them back, but it can only give them back to a parent that still exists. A host that drops
.gl-mainfirst has already lost them.⚠️ Proximity mode is NOT cancelled. Clearing it would mean calling back into the filter capability — a business effect on a teardown path — so the engine keeps whatever filter was applied while the pill's own flag resets. A host that tears down mid-proximity should cancel it itself first.