Visualizer: stop capability panels inflating in height; add drag-to-reposition - #1148
Merged
BioCam merged 2 commits intoJul 5, 2026
Merged
Conversation
…-reposition - Measure the single-channel panel at its natural width so a panel parked near the right edge of main cannot wrap its channel columns into a tall stack and inflate the height the plate/arm panels inherit. - Route all three panels through applyMachineToolPanelPos, clamping each within main on every edge. - Add drag-to-reposition by a panel's background or edges, with positions remembered in localStorage; each panel carries a top-right return-to-default indicator (the deck home icon) shown only once it has been moved. - Rename the navbar label "Machine Tools" to "Capabilities"; rename the 96-head info panel to "96-Channel Head Pipette" with type «Head96». Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…el edge cases - Re-clamp open panels from the ResizeObserver so a remembered position cannot strand a panel off-screen after the drawing area shrinks (window resize, sidebar toggle); positions and sizes are unchanged when they fit. - End a drag when the mouse button is released outside the window (no mouseup reaches the document) via an ev.buttons check and a window blur handler. - Validate stored positions with Number.isFinite so a corrupt localStorage entry falls back to the default instead of NaN. - Preserve the return indicator across state re-fills (clearPanelContent) instead of rebuilding it on every update. - Wrap the Capabilities label toggle in an IIFE so it targets its own liquid handler instead of the last one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The machine-tool popups (now labeled "Capabilities") could balloon to nearly full-window height. positionPanels measured the single-channel panel while it sat at the button's horizontal center; parked near the right edge of main, a width:fit-content panel wraps its channel columns into a tall stack, and that inflated height was then copied onto the plate and arm panels. The measurement was wrong, not the panels.
Behavior: the default layout and panel sizes are unchanged - a panel only moves if you drag it, and never changes size. Positions persist per browser, and a corrupt stored value falls back to the default.
🤖 Generated with Claude Code