Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix map panning issues related resource info modal #539

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

ravicodelabs
Copy link
Contributor

@ravicodelabs ravicodelabs commented Oct 6, 2024

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

This fixes the issue where opening a site, then clicking "Near Me", then
closing the info modal was panning back to the prior site, whereas it
should have stayed at the "Near Me" site. This is "issue C" as discussed
in the comments of GitHub issue #527.
The name change reflects the fact that currently as a user may have
panned around the map by clicking and dragging the map, the `mapCenter`
state was not updated. Instead, the state is updated when e.g. a pin
is clicked, or the "Near Me" button is clicked.
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