You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Programmatic zoom intiated while the user is making a gesture causes the zoom callback to be invoked with the sourceEvent from the preceding user action, rather than an undefined sourceEvent.
I think this is because there is an active Gesture on the element and the following line does not update the event to null or undefined:
The example notebook tries to perform a programmatic zoom once for every user-initiated zoom, but because the programmatic zoomed callback is invoked with a trusted sourceEvent, this results in infinite recursion.
First noticed here (which now implements a workaround)
The text was updated successfully, but these errors were encountered:
yurivish
changed the title
Programmatic zoom transforms have a trusted sourceEvent if initiated during a zoom gesture
Programmatic zoom transforms are passed an incorrect sourceEvent if initiated during a zoom gesture
Jun 24, 2022
yurivish
changed the title
Programmatic zoom transforms are passed an incorrect sourceEvent if initiated during a zoom gesture
Zoom event listeners are passed an incorrect sourceEvent if programmatic zoom is initiated during a user's zoom gesture
Jun 24, 2022
yurivish
changed the title
Zoom event listeners are passed an incorrect sourceEvent if programmatic zoom is initiated during a user's zoom gesture
Zoom event listeners are passed an incorrect sourceEvent if a programmatic zoom occurs during a user zoom gesture
Jun 24, 2022
Programmatic zoom intiated while the user is making a gesture causes the
zoom
callback to be invoked with the sourceEvent from the preceding user action, rather than an undefined sourceEvent.I think this is because there is an active Gesture on the element and the following line does not update the event to null or undefined:
d3-zoom/src/zoom.js
Line 192 in 23016d4
which is called indirectly from
https://github.com/d3/d3-zoom/blob/main/src/zoom.js#L85
with an
undefined
event.Example: https://observablehq.com/d/11402b3301150892 (see console for stack overflow)
The example notebook tries to perform a programmatic zoom once for every user-initiated zoom, but because the programmatic
zoomed
callback is invoked with a trusted sourceEvent, this results in infinite recursion.First noticed here (which now implements a workaround)
The text was updated successfully, but these errors were encountered: