Open Aljal opened 3 years ago
Hi @Aljal,
Thanks for using react-simple-maps!
Yes, I am assuming here that an older version of d3-selection/d3-zoom is causing the problem. Are you using another data visualization library in parallel with react-simple-maps?
Does it work if you install d3-selection/d3-zoom v2 (^2.0.0
) explicitly?
Does it work if you install d3-selection/d3-zoom v2 (^2.0.0) explicitly?
I tried but it doesn't work.
I works using a different version: "react-simple-maps": "2.1.2"
Hi,
First of all thank you for this amazing library.
Description
I'm using react-simple-maps in a project and I am facing an issue using ZoomableGroup wih buttons (zoom in and out).
Here is my code:
The error appear when clicking the zoom in link
<a onClick={handleZoomIn}><PlusSquare /></a>
(where<PlusSquare />
is a simple svg).Here is the error:
It seems that the problem comes from d3-zoom or the multiple versions of d3-selection installed, I found this issue on github but I can't understand why and how to fix it. Is it because I'm using another package which uses d3-selection with another version ? How can I fix it ?
Expected behavior
The zoom should change according with the
setZoom
function without throwing an error.Version:
package.json
"react-simple-maps": "^2.3.0"
package-lock.jsonThank you for your attention and sorry for my limited English skills.