mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
fix: no default-fit flash when opening with a saved zoom (HP-1551)
The cached config (LS_CFG) painted its first frames with _zoom=1 because the saved per-space zoom was applied only by _restoreZoom()'s rAF after the server config round-trip - the plan visibly jumped to the saved scale. - setConfig now arms _zoom from LS_ZOOM for the resolved space before the first view computation (view mode, no established view only); - _restoreZoom applies the view synchronously when the stage is already measured (space tabs, kiosk carousel, editor exit included); the rAF path remains only for an unmeasured stage, where updated() already fits with the correct zoom before the first paint. New smoke_zoom_flash.mjs samples every rAF frame from the first possible moment with a primed config cache, saved zoom 1.8 and a 350 ms server delay: a visible stage with a default-scale viewBox fails the run (22 such frames before the fix, 0 after).
This commit is contained in:
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user