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

Regression: mouseenter event is fired on wrong layer #6896

Closed
pathmapper opened this issue Jun 30, 2018 · 0 comments · Fixed by #6909
Closed

Regression: mouseenter event is fired on wrong layer #6896

pathmapper opened this issue Jun 30, 2018 · 0 comments · Fixed by #6909
Assignees
Labels

Comments

@pathmapper
Copy link
Contributor

pathmapper commented Jun 30, 2018

mapbox-gl-js version: v0.46.0

browser: Chrome on Linux

Beginning with v.0.45.0 a mouseenter event is fired on the wrong layer if two layers are using the same GeoJSON source and the mouseenter listener is on the second layer.

Steps to Trigger Behavior

  1. Add two line layers using the same source to a map.
  2. Set up a mouseenter listener on the second layer to change the line-color of this layer.
  3. Hover over the second layer.

Link to Demonstration

https://jsbin.com/resezeyosu/edit?html,output

Expected Behavior

line-color of the second layer changes when hovering over the second layer.

Demonstration with v0.44.2: https://jsbin.com/bicatukoxa/edit?html,output

Actual Behavior

line-color of the second-layer changes when hovering over the first layer

@pathmapper pathmapper changed the title Regression: Hover event is registered on wrong layer Regression: mouseenter event is fired on wrong layer Jul 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants