summaryrefslogtreecommitdiff
path: root/crates/gipfel-desktop/icons/android/mipmap-xhdpi
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-10-27 14:01:38 +0100
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2026-10-27 14:01:38 +0100
commite838bb23f8251c7b2d5b0ebfca820f38680cc022 (patch)
treecdb1ffabde8bab8047944e83977013542320c1e8 /crates/gipfel-desktop/icons/android/mipmap-xhdpi
parentf6883fa1d586a040bf228ab886b95ca64457fa34 (diff)
web: guarantee initial fit with a ResizeObserver on the canvas
The fit at load time (and the 120 ms nudge) could still run before the canvas had a valid layout size, leaving the first image invisible until 'Fit to window' was pressed. A ResizeObserver attached when the first bitmap arrives fires once with the element's real size immediately after observing, then on every later resize; it re-fits automatically unless the user has panned or zoomed by hand since the last load (user_moved flag, reset on each image load). Window resizes now re-fit the image as well instead of only redrawing it.
Diffstat (limited to 'crates/gipfel-desktop/icons/android/mipmap-xhdpi')
0 files changed, 0 insertions, 0 deletions