Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property '0' of undefined while rotating the map #10

Closed
ghost opened this issue Jun 28, 2018 · 1 comment
Closed

Cannot read property '0' of undefined while rotating the map #10

ghost opened this issue Jun 28, 2018 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 28, 2018

Hi ofrohn,

the following error will freeze the celestial map so I can't rotate the map anymore. I am trying to figure out when it happens..it seems to happen when I am using the mouse wheel to zoom in/out and, at the same time, the mouse pointer exits from the region's map.

celestial.js:880 Uncaught TypeError: Cannot read property '0' of undefined
at Function.forward.invert (celestial.js:880)
at Function.Ct.n.invert.t.invert.e.invert (d3.min.js:1)
at Function.e [as invert] (d3.min.js:2)
at position (celestial.js:2551)
at HTMLCanvasElement. (celestial.js:2437)
at HTMLCanvasElement.t (d3.min.js:1)
at d3.min.js:1
at l (d3.min.js:3)
at HTMLCanvasElement.p (d3.min.js:3)
at HTMLCanvasElement.__onwheel.zoom (d3.min.js:1)
forward.invert @ celestial.js:841
Ct.n.invert.t.invert.e.invert @ d3.min.js:1
e @ d3.min.js:2
position @ celestial.js:3738
(anonymous) @ celestial.js:3631
t @ d3.min.js:1
(anonymous) @ d3.min.js:1
l @ d3.min.js:3
p @ d3.min.js:3
(anonymous) @ d3.min.js:1

This is another error that happens when the mouse pointer exits from the map's region while I am rotating the map (i.e. while I am holding down the left mouse button). By the way, it doesn't make the celestial map crash.
Uncaught TypeError: Cannot read property '0' of undefined
at Function.forward.invert (celestial.js:880)
at Function.Ct.n.invert.t.invert.e.invert (d3.min.js:1)
at Function.e [as invert] (d3.min.js:2)
at position (celestial.js:2551)
at HTMLCanvasElement. (celestial.js:2449)
at HTMLCanvasElement.t (d3.min.js:1)
at d3.min.js:1
at c (d3.min.js:3)
at n (d3.min.js:3)
at d3.min.js:1
forward.invert @ celestial.js:841
Ct.n.invert.t.invert.e.invert @ d3.min.js:1
e @ d3.min.js:2
position @ celestial.js:3738
(anonymous) @ celestial.js:3637
t @ d3.min.js:1
(anonymous) @ d3.min.js:1
c @ d3.min.js:3
n @ d3.min.js:3
(anonymous) @ d3.min.js:1

Any help will be great. Thank you in advance.

@ofrohn
Copy link
Owner

ofrohn commented Jul 1, 2018

I clicked, dragged and zoomed with the mouse all over the place like a ninny, but couldn,t trigger the error on any test environment available to me.
However, the fault has to be in the invert method of the projection, so I tried ignoring invalid coordinate values, and hope D3 throws them away too.
Can you check if the issue still appears? If not, fixing it may take some time, because
Function.Ct.n.invert.t.invert.e.invert (d3.min.js:1)
D3 sure has some interesting ways to do things!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant