phlask / phlask-map

Code behind the Phlask Web Map
https://beta.phlask.me
34 stars 36 forks source link

Fix map panning issues related resource info modal #539

Closed ravicodelabs closed 1 month ago

ravicodelabs commented 1 month ago

Change Summary

Addresses #527. Introduces lastResourcePan in redux state to supersede prior mapCenter in redux, and currentLat/currentLon component state in <ReactGoogleMaps>, which helps properly track the last pan caused by the user clicking a pin or on the "Near Me" button.

Change Reason

Fixes various issues as described in detail in issue #527, where the map was panning when it shouldn't be, and wasn't panning when it should be, depending on the scenario.

Related Issue: #527

ravicodelabs commented 1 month ago

I believe your last comment was addressed. Please let me know if I've missed anything!

gcardonag commented 1 month ago

I believe your last comment was addressed. Please let me know if I've missed anything!

Nope, your change makes sense! I'm thinking the check for typeof in the old SET_SELECTED_PLACE action was tied to code that is no longer in-place today, so removing it makes sense.