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

mouseenter event not firing correctly on circle #5756

Closed
VictorChen opened this issue Nov 27, 2017 · 5 comments · Fixed by #6036
Closed

mouseenter event not firing correctly on circle #5756

VictorChen opened this issue Nov 27, 2017 · 5 comments · Fixed by #6036
Assignees
Labels

Comments

@VictorChen
Copy link

VictorChen commented Nov 27, 2017

When you enter the circle from the LEFT side (works fine on other sides, just not the left), the mouseenter event doesn't get fired until you reach closer to the center.

Reproducer:
https://jsfiddle.net/0mknjj30/6/

screen shot 2017-11-27 at 1 16 02 pm

I'd expect it to trigger AS SOON as my cursor touches the left edge of the circle

@peterqliu
Copy link
Contributor

thanks for the issue @VictorChen

Looks like the left edge of the circle spills into a different tile that doesn't contain the point geometry for the circle, despite the circle being rendered in it:

screen shot 2017-11-27 at 11 30 09 am

@peterqliu
Copy link
Contributor

peterqliu commented Nov 30, 2017

^ @VictorChen to clarify, that is the expected behavior, just an undesirable one. The mouseenter event acts on the location of the underlying data (here, the center of the circle, in the tile to the east), rather than the rendered pixels.

@VictorChen
Copy link
Author

thanks @peterqliu, although that feels like a weird expected behavior (the fact that the mouseenter event gets triggered sometimes on the edge and sometimes not).

@andrewharvey
Copy link
Collaborator

I thought increasing the buffer might help, ensuring that the feature is also present in the tile on the left but testing this with buffer: 512 made no difference.

@ajfickas
Copy link

I've run into this issue trying to implement hover states for features in a symbol layer. queryRenderedFeatures fails to return a given feature when hovering portions of the feature's icon and label that cross into another tile.

Here's repro: https://jsfiddle.net/ajfickas/gpv122z4/

Is the plan to address this as part of #6022?

@ansis ansis self-assigned this Jan 22, 2018
ansis added a commit that referenced this issue Jan 22, 2018
fix #5756

Some rendered features (circles, symbols, lines) can extend outside of
the boundaries of the tile they are stored in. When querying we have to
check all tiles within `additionalRadius` of the query.
ansis added a commit that referenced this issue Jan 22, 2018
fix #5756

Some rendered features (circles, symbols, lines) can extend outside of
the boundaries of the tile they are stored in. When querying we have to
check all tiles within `additionalRadius` of the query.
ansis added a commit that referenced this issue Jan 22, 2018
fix #5756

Some rendered features (circles, symbols, lines) can extend outside of
the boundaries of the tile they are stored in. When querying we have to
check all tiles within `additionalRadius` of the query.
ansis added a commit that referenced this issue Mar 6, 2018
fix #5756

Some rendered features (circles, symbols, lines) can extend outside of
the boundaries of the tile they are stored in. When querying we have to
check all tiles within `additionalRadius` of the query.
ansis added a commit that referenced this issue Mar 6, 2018
fix #5756

Some rendered features (circles, symbols, lines) can extend outside of
the boundaries of the tile they are stored in. When querying we have to
check all tiles within `additionalRadius` of the query.
ansis added a commit that referenced this issue Mar 12, 2018
fix #5756

Some rendered features (circles, symbols, lines) can extend outside of
the boundaries of the tile they are stored in. When querying we have to
check all tiles within `additionalRadius` of the query.
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.

6 participants