Skip to content

Using d3 6.3.1 and zoom/drag problems (Supporting d3 v6.x + @types/react-d3-graph for TS) #434

Open
@mehdy-karimpour

Description

@mehdy-karimpour

Describe the bug

  1. As you know, d3 from 6 version has removed d3.event global, then zooming produces an exception "Cannot read property 'transform' of undefined" because it uses var transform = _d3Selection.event.transform;(First image)

  2. Dragging produces "Cannot read property 'undefined' of undefined" exception(Second image)

To Reproduce
Steps to reproduce the behavior:
Use zoom/drag functionalities

Expected behavior
Zooming in/out with-out exception

Screenshots
image
image

Environment:

  • OS Windows
  • Browser Chrome
  • Version 88.0.4324.150
  • Node version v14.15.5
  • react-d3-graph version 2.6.0
  • d3 version 6.3.1
  • react version 17.0.1

Additional context
Related to issue #365 and Pull request #380

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions