How to use this way to drag a globe with d3@6 ?
Hi @neocarto and welcome to the forum!
I tried following Fil’s migration guide and changed d3.mouse
to d3.pointer
, which resolved the initial console errors but still I am getting errors when trying to drag and scroll:
Uncaught TypeError: Cannot read property '0' of undefined
at Function.E.rotate (d3.min.js:2)
at SVGSVGElement.dragged (observablehq-26:29)
at nt.call (d3.min.js:2)
at Object.e [as mouse] (d3.min.js:2)
at p (d3.min.js:2)
at d3.min.js:2
Have you seen the migration guide? I imagine you’re better at this than me - so perhaps it’ll help point you in the right direction?
The release notes and migration guide should tell you everything you need to change, but here you go:
2 Likes
Also, see this example:
1 Like