Protected Readonly_classProtected_closeClose button (clicked → hide(), surfaces the pill).
Protected Readonly_containerProtected_destroyedProtected_headerDrag handle inside the panel — usually the title row.
Protected Readonly_minProtected Readonly_minProtected Readonly_modalProtected_panelRoot panel element. Populated by subclass in _buildDom().
Protected_pillFloating "reopen" pill shown while the panel is hidden.
Protected Readonly_resizableProtected Readonly_storageProtected Readonly_tierReadonlyonFires while the user drags the panel (one notification per
pointermove during a drag) and once when the drag ends.
Drag changes the panel's CSS left / top but never its
size, so a ResizeObserver on any descendant element never
sees it. Subclasses or hosts that need to track the panel's
viewport position — for example a View
embedded in the body whose shared WebGL canvas must follow
the panel — should subscribe to this and re-read the
panel's bounding rect.
ReadonlyonFires when show() / hide() toggles the panel's visibility.
ReadonlysceneScene the panel is bound to. Stable across the panel's lifetime; the user-facing surface that changes is which sceneModel is currently focused.
SceneModel currently being inspected. Mutated by focusModel as the user picks a different model from the tab strip; readers should treat it as the panel's "current target".
true when the floating panel is mounted and visible. false
when the user has dismissed it via the close button (the pill
is showing instead).
Protected_bindWire the shared chrome behaviour onto the DOM the subclass built. Idempotent — calling twice is a no-op.
Protected_bindInject eight invisible drag handles (4 edges + 4 corners)
into _panel and wire pointer events. Each handle pins the
panel to absolute left / top on pointerdown (so subsequent
size + position writes take effect over any CSS that uses
right / bottom), then writes new width / height —
and, for north / west edges, new left / top — on
pointermove. onLayoutChanged fires per move and at drag-end;
the saved layout is updated on drag-end.
min-width / min-height enforced from _minWidth /
_minHeight; max-width / max-height are released by
setting them to "none" inline so user-driven size is not
clipped by CSS bounds like max-height: calc(100vh - 32px).
Protected_buildSubclass populates _panel, _pill, _header, _closeBtn
here, and appends _panel + _pill to _container. Called
exactly once, before _bindChrome.
Protected_clampProtected_restoreProtected_saveEngage the header drag from an external pointerdown / move
event so the panel begins following ev immediately. Used by
the drag-to-undock gesture on docked View cells — the cell's
own pointer listener detects motion-past-threshold, replaces
the cell with this freshly-created floating panel, and hands
the live pointer over via this method.
The panel is reflowed so the pointer sits inside its header at
(panelOffsetX, panelOffsetY) from the panel's top-left. Then
setPointerCapture routes all subsequent pointermove /
pointerup events for this pointerId to the panel's own
header, where _bindChrome's existing listeners drive
the drag — no parallel drag loop required.
OptionalpanelOffsetX: numberOptionalpanelOffsetY: numberTear down DOM and global listeners. Idempotent.
Switch the panel's focused SceneModel — re-paints the tab strip and the stats grid, clears the previous run's report baseline + fix history (they belong to the old model), and triggers a fresh inspection. Cheap when the requested model matches the current focus (no-op).
Hide the panel and surface the floating reopen pill instead.
Run an async inspection against sceneModel, render the
report into the panel, and return it. Returns null if the
user cancelled the run via the progress strip.
Optional label shown on the progress strip while the inspection runs. Defaults to "Inspecting model".
Reveal the panel; hide the floating reopen pill.
Toggle visibility.
StaticgetReturns the existing live panel bound to a Scene, or
undefined if none has been constructed. Accepts either a
Scene directly or a SceneModel (its .scene is used).
StaticiconSVG markup for the panel's title-bar glyph (tick-in-a-box).
Strokes use currentColor, so the icon picks up whichever
colour the host element sets — the panel's title bar paints
it primary blue; the right-click context menu uses the
same colour via its own CSS rule.
Single source of truth — both _buildDom and any external
caller (e.g. ViewObjectContextMenu) read from this one
method.
StaticopenReveal (or lazily mount) a panel for sceneModel, run an
inspection, and return the instance. Idempotent — if a panel
already exists for this SceneModel and is still alive, it's
brought back to the foreground; otherwise a fresh one is
constructed.
Built for the ViewObjectContextMenu "Inspect Model" entry,
which works in every example regardless of whether the
host has wired up its own SceneHealthPanel — clicking
the menu item always opens a panel.
Abstract base for every floating demo panel. Subclasses build their DOM in
_buildDom(), then call_bindChrome()to activate drag / pill / persistence behaviour.