-
Notifications
You must be signed in to change notification settings - Fork 142
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
Does not receive "end" event after pressing right mouse button during drag & drop with left button #198
Comments
I applied already my fork https://github.com/kapulkin/d3-zoom at https://viete.io/a170102c-e7b6-11e9-b4f9-9600001cf28e, so you will not be able to reproduce the bug there. |
Hi! |
I'm sorry I'm not able to reproduce the issue. Could you try and isolate it in a simple page (a block or notebook?). I'm also surprised that To read the mouse buttons and filter the zoom start accordingly, you might want to test d3.event.buttons (https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/buttons). |
|
It would really help to be able to reproduce the issue with readable code. I've spent quite some time on it now, but I wasn't able to figure out how to make the gesture's "active" count go beyond 1. I can only suppose that there is a conflict between event listeners. Also, I don't dispute that your patch helps in your case, and that it makes sense to unregister mouseup only if the active count is down to 0, but I'm not sure why we would unregister mousemove.zoom and restore drag if active > 0? In other words, if the gesture has somehow not been closed by that mouseup event, then everything should wait for the real end of the gesture? |
(moved to #222) |
@Fil Thank you for your help! |
This seems to: - fix #83 - possibly fix d3/d3-zoom#198 - help with d3/d3-zoom#222
This seems to: - fix #83 - possibly fix d3/d3-zoom#198 - help with d3/d3-zoom#222
* create emit before we use it; make move accept an event. This seems to: - fix #83 - possibly fix d3/d3-zoom#198 - help with d3/d3-zoom#222 * update dependencies * brush.clear event Co-authored-by: Mike Bostock <[email protected]>
I bind brush tool to zoom events with left mouse button. Also I bind drag & drop logic to zoom events with right button pressed. You could look here: https://viete.io/a170102c-e7b6-11e9-b4f9-9600001cf28e
To reproduce:
I use code below to initialize zoom:
I use nuxt and d3 of versions:
"nuxt": "^2.9.2"
"d3": "^5.11.0"
The text was updated successfully, but these errors were encountered: