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

Selected highlighting #30

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Selected highlighting #30

wants to merge 10 commits into from

Conversation

samussiah
Copy link
Contributor

No description provided.

@jwildfire
Copy link
Contributor

Here are Mike Bostock's thoughts on how do deal with mouseover and brushing in the same chart. In particular this:

"A third possibility is to put the display elements on top of the brush, but to set the to pointer-events none when a capturing mousedown listener on a containing element is triggered. This should prevent the display elements from participating in pointer events while the mouse is down, but otherwise let them trigger mouseover and mouseout events. This is probably the simplest solution, but I haven’t tested it."

So, put a listener on the svg that pulls the brush to the front on mousedown and then drop it back to the back on brush.end(). Then ditch themousemove event on the svg and just handle interactivity on the points with click, mouseover and mouseout events on the points.

@jwildfire jwildfire mentioned this pull request Sep 16, 2017
@jwildfire
Copy link
Contributor

This article on bubbling vs. capturing events is going to be important too ...

@jwildfire
Copy link
Contributor

jwildfire commented Sep 19, 2017

Can't get that 3rd approach to work for a click in a hex/point. The re-order happens after the click, so brush.start isn't triggering (since the click is on a hex, not the g.brush rect). Might work using a capturing event if the hexes were actually nested in the g.brush, but that is far from optimal. Going to try something like this instead (working gist here). If I understand it correctly the mousedown event just simulates the brush start here, which seems like a good option ...

@jwildfire jwildfire removed their request for review April 2, 2019 14:52
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.

None yet

2 participants