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 example not changing popup when mouse moves to another overlapping feature #5442

Merged
merged 2 commits into from
Feb 2, 2025

Conversation

matths
Copy link
Contributor

@matths matths commented Feb 1, 2025

This PR fixes this issue #5327
The documentation example Display a popup on hover.
The Popup doesn't change when moving to another overlapping feature. This is caused by the mouseenter event not triggered again because we didn't leave the layer while moving to the other feature.
As a fix we are using mousemove instead of mouseenter event and check if the mouse is over another feature and the popup content needs to change.

Launch Checklist

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

Copy link

codecov bot commented Feb 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.94%. Comparing base (bedcb86) to head (1290c3b).
Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5442   +/-   ##
=======================================
  Coverage   91.94%   91.94%           
=======================================
  Files         282      282           
  Lines       39039    39039           
  Branches     6849     6848    -1     
=======================================
  Hits        35896    35896           
  Misses       3016     3016           
  Partials      127      127           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HarelM
Copy link
Collaborator

HarelM commented Feb 1, 2025

Thanks for taking the time to fix this example!
I've added a few minor comments.

Copy link
Collaborator

@HarelM HarelM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

THANKS!

@HarelM HarelM merged commit bb75ae7 into maplibre:main Feb 2, 2025
17 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.

2 participants