Grow the selected station marker again on the map - #389
Merged
Merged
Conversation
#388 dropped this when it moved the map to MapCompose: the canvas renderer it replaced drew the selected station at 1.45x and drew it last so it sat above its neighbours, and neither survived the port — tapping a marker changed nothing but the detail card. The marker composable now reads the selection and animates to the same 1.45x, and updateMarkerZ raises just the selected marker so the larger one isn't hidden behind its neighbours in a dense city centre. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Summary
Fixes a regression I introduced in #388. The canvas renderer it replaced drew the selected station at 1.45×, and drew it last so it sat above its neighbours. Neither survived the port to MapCompose —
StationMarkertook only a colour, so tapping a marker changed nothing on the map itself, only the detail card below it.Two things restored:
SELECTED_MARKER_SCALE, matching the old constant exactly).updateMarkerZraises only the selected marker and drops the previous one back, so the enlarged marker isn't hidden behind its neighbours in a dense city centre.The z-ordering needs
updateMarkerZrather thanaddMarker(zIndex = …), since a marker's z-index is fixed when it's added and selection changes afterwards.Test plan
:androidApp:assembleDebug:common:compileKotlinIosArm64+:common:compileKotlinIosSimulatorArm64:compose-desktop:build:compose-web:build🤖 Generated with Claude Code