Skip to content

Grow the selected station marker again on the map - #389

Merged
joreilly merged 1 commit into
mainfrom
fix-selected-marker
Sep 20, 2026
Merged

joreilly merged 1 commit into
mainfrom
fix-selected-marker

Conversation

@joreilly

Copy link
Copy Markdown
Owner

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 — StationMarker took only a colour, so tapping a marker changed nothing on the map itself, only the detail card below it.

Two things restored:

  • The marker composable now reads the selection and animates to the same 1.45× (SELECTED_MARKER_SCALE, matching the old constant exactly).
  • updateMarkerZ raises 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 updateMarkerZ rather than addMarker(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
  • Wasm: two adjacent unclustered markers render at equal size; after tapping one it is visibly larger than its neighbour, and the detail card shows the matching station ("185 - JORGE NEWBERY", 7 bikes / 9 slots)
  • Android and iOS not exercised at runtime — compile-only

🤖 Generated with Claude Code

#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>
@joreilly
joreilly merged commit 4f7c977 into main Sep 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant