ParkingReformNetwork / parking-lot-map

Interactive map showing how much of downtowns are dominated by parking
https://parkingreform.org/parking-lot-map/
MIT License
1 stars 5 forks source link

Scorecard updates to city in view or closest to center of map #143

Closed tunglinn closed 9 months ago

tunglinn commented 10 months ago

Resolves #112

tunglinn commented 10 months ago

Right now, only the scorecard updates. Should the dropdown also change?

Eric-Arellano commented 10 months ago

Should the dropdown also change?

I think probably? Otherwise you get into a weird UI state where the UI components aren't in sync. What do you think?

tunglinn commented 10 months ago

Should the dropdown also change?

I think probably? Otherwise you get into a weird UI state where the UI components aren't in sync. What do you think?

I agree. My concern is how do we differentiate between changes in the dropdown by the user versus by a function. Because if we don't, then changing the dropdown will also 'snap' the map view to the other city.

Eric-Arellano commented 10 months ago

then changing the dropdown will also 'snap' the map view to the other city.

we want that, right? That's the current behavior.

tunglinn commented 10 months ago

we want that, right? That's the current behavior.

Yes, for switching cities via the dropdown. But if the dropdown updates when the user is dragging to another city, then the same setMapToCity() is called and snaps view to city, which will make it difficult for users to just drag around the map.