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

How to add passive listener into zoom event? #280

Closed
MUTHUKUMAR73737 opened this issue Mar 25, 2021 · 1 comment
Closed

How to add passive listener into zoom event? #280

MUTHUKUMAR73737 opened this issue Mar 25, 2021 · 1 comment

Comments

@MUTHUKUMAR73737
Copy link

image

I am getting above error when I drag inside the chart.

d3.select("svg") .call( d3.zoom() .scaleExtent([1, 10]) .translateExtent([[0, 0], [400, 215]]) .extent([[0, 0], [400, 215]]) .on("zoom", function (event) { // stuff here })

Relevant Analysis:
https://developers.google.com/web/updates/2016/06/passive-event-listeners
https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
https://github.com/d3/d3-selection/blob/v2.0.0/README.md#selection_on

From the above analysis, what I observed is we should turn off the passive event listener.

I would like to pass additional options like passive event listener in the d3js event handling.

I am using d3js version 6.3.1

Please help me to resolve this issue.

@Fil
Copy link
Member

Fil commented Mar 25, 2021

duplicate of d3/d3-zoom#231

@Fil Fil closed this as completed Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants