fix: keep the Plotly camera and axis ranges through data updates

Plotly.react resets any scene attribute the incoming layout omits, so every
selection change snapped the camera back to the default and re-fit the
ranges - the pinned framing was meaningless. Data-only pushes now pass
preserveView and html.py merges the live camera and axis ranges into the
incoming layout; only an explicit re-frame sends computed framing.

Also fixes the ordering bug where the framing flag was consumed before the
not-ready early return, which dropped the very first framing on the floor
(show_project runs before loadFinished).

Verified in the browser: user orbit + zoom survive selection and working
plane updates, while reset_camera re-frames. Regression-tested headlessly
by asserting the emitted preserveView flag.
This commit is contained in:
smillmorel 2026-09-16 20:05:35 -04:00
commit 8f7bc3cf4f
4 changed files with 159 additions and 22 deletions

BIN
AGENTS.md

Binary file not shown.