Closed deristnochda closed 7 years ago
Yes. You’re calling zoom.extent with two arguments:
.extent([100, 100], [width-100, height-100])
You should be calling it with one argument:
.extent([[100, 100], [width-100, height-100]])
Alternatively you can remove the call to zoom.extent entirely and use the default behavior which is to allow zooming anywhere within the SVG.
http://bl.ocks.org/mbostock/ad30855f79f2fdfa40d10a8604caff22
Use the amazing D3 library to animate a path on a Leaflet map with d3 v4.8.0 zoom does not work well. I have coopied the same GeoJson, and i am using map.on("zoom",reset) event, but on map zoom out my svg goes out from Manhattan
@margaretaNikolov Please use Stack Overflow tag d3.js to ask for help. For more, please read my guide on Asking for Help.
Ok. Thank you for your help!
I recently did some line charts with zoom functionality using the d3 library hosted on d3js.org. Today I noticed that the zoom is not working anymore because d3.event.transform produces NaNs (see the console log in the second link). Below is an (hopefully minimal enough) example,
with v4.3
with v4.4 hosted on d3js.org
Did I do something wrong?