d3-selection icon indicating copy to clipboard operation
d3-selection copied to clipboard

Firefox error when calling d3.pointer inside of 'zoom' event handler

Open Fil opened this issue 5 months ago • 1 comments

Discussed in https://github.com/d3/d3/discussions/3907

Originally posted by @tsairinius August 29, 2024 In the following example, I am calling d3.pointer inside of a 'zoom' event handler. The zoom behavior is being applied to an SVG element. When I call the zoom behavior's scaleTo method, the following error occurs in Firefox (Chrome and Edge seem to work fine):

"TypeError: SVGPoint.x setter: Value being assigned is not a finite floating-point value."

I've also tried replacing scaleTo with scaleBy and transform, but the same error pops up.

See example here: https://jsfiddle.net/nLt523mj/

Fil avatar Aug 30 '24 08:08 Fil