Repository navigation
Layout: bottom float zones clear the basemap logo and attribution - #575
Closed
sandesh-sp wants to merge 2 commits into
Closed
sandesh-sp wants to merge 2 commits into
sandesh-sp wants to merge 2 commits into
Conversation
The deck.gl engine measures how far the basemap's bottom control corners reach up from the map's edge and reports it as map:getChromeInsets and map:chromeInsetsChange. The modern layout lifts the bottom float zones by that much, less any part a panel already covers.
sandesh-sp
force-pushed
the
feature/570-map-chrome-insets
branch
from
October 15, 2026 19:58
ed60e6b to
e13ce6d
Compare
The engine also reports how far each corner's chrome reaches in from its side, so a zone beside the logo or attribution (in the overlay layout, where it sits under a side panel) stays on the edge. Inset changes are announced only when the rounded values change, and the zero insets are one shared constant.
Collaborator
Author
|
Replaced by #577: an admin-configured bottom offset for floating panels instead of measuring the basemap's logo and attribution at runtime. |
1 of 5 tasks
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.
Part of #570. Stacked on #574 (
feature/570-scale-bar). Merge that first, then retarget this PR todevelopment.Summary
float-bottom-left) could overlap them. The modern layout now liftsbottom-left,bottom-rightandbottom-centerzones by how far that chrome reaches up (bottom-centeruses the taller of the two sides).IMapEngine.getChromeInsets()returns, in CSS pixels, how far each bottom corner's chrome reaches up (bottomLeft,bottomRight) and in from its side (bottomLeftWidth,bottomRightWidth).DeckGLAdaptermeasures the basemap's bottom control corners with aResizeObserver(they're filled after the map is created) and emitschromeinsetschangewhen the rounded values change.LeafletAdapterreturns zeros, because its attribution control is removed at init.map:getChromeInsets(request) andmap:chromeInsetsChange(event). Documented inEvent-Bus-API.md.UserInterfaceModern_subscribes to the event, asks once on init in case the map reported first, and writes--ui-map-chrome-bottom-left/righton:root. A zone is lifted only for chrome beneath it: chrome beside the center region (under a side panel, in the overlay layout) is ignored, and any part a bottom panel already covers is subtracted, and the lift is recomputed when the center area resizes. Everything is cleaned up on teardown.Test plan
npx vitest run: 216 files, 3,648 tests pass (deckGLOverlayChrome.spec.jsanduserInterfaceModern.mapChrome.spec.jscover the measurement and the lift)float-bottom-leftpanel (e.g. ScaleBar): the panel sits just above the MapLibre logofloat-bottom-rightpanel sits above the attribution, and stays clear when the attribution is expanded or collapsed