Skip to content

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

@Fil

Description

@Fil

Discussed in d3/d3#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/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions