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

Roll back autozoom on click while keeping pan-on-search intact #260

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

nickvisut
Copy link
Collaborator

@nickvisut nickvisut commented Oct 11, 2024

NOTE: This is a WIP (Draft status), so is likely to be buggy.

The following has been modified:

  • on school focus, panning to center happens only if school is out of bounds
  • on useEffect (when any of selectedSchool, mapLoaded, flyToOptions*, userHasInteracted change), panning (or jumping) to center happens only if school is out of bounds

Closes #259

*is static, so candidate for removal


Potential TODOs for this or future PR:

  • consolidate some of the panning / jumping code
  • look for opportunities to combine the focus handler and the useEffect
  • instead of just checking for "out of bounds", also check if school is topmost element
  • make sure bottom of school marker is visible (ideally, adjust bottom of marker to be centered on school's lat/lng)

Copy link

vercel bot commented Oct 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
support-sfusd ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 17, 2024 3:07am

precedence vs hover marker styling
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.

[Bug]: Map autocenters on school click/focus
1 participant