Repository navigation
fix(render_map_tool): keep zoom buttons below the summary chip when it wraps - #326
Open
mattpodwysocki wants to merge 2 commits into
Open
mattpodwysocki wants to merge 2 commits into
mattpodwysocki wants to merge 2 commits into
Conversation
…t wraps #278 placed the top-left controls below the chip when it appeared, but measured the chip only once. If the host narrowed the frame afterwards, the chip wrapped to more lines and covered the zoom buttons again. A ResizeObserver on the chip now re-places them whenever its size changes. Fixes #307 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jussi-sa
approved these changes
Nov 6, 2026
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.
Fixes #307.
Why
#278 (in 0.17.0) moved the zoom and layer buttons below the summary chip when it appears, which fixed the original report. But it measured the chip only at that moment. If a host narrows the frame or switches display mode afterwards, the chip wraps to more lines and covers the buttons again.
What
A
ResizeObserveron the chip re-runs the existingplaceTopLeftControls()whenever the chip changes size. Browsers withoutResizeObserverkeep today's behavior.Checked
I rendered the map page in Chrome inside a host-style iframe with a longer route summary, then narrowed the iframe after the map was drawn:
Widening back to 520 px moves the buttons back up to 64 px.
42pxinstead of87px) and passes with this change.🤖 Generated with Claude Code