ofrohn/d3-celestial

azimuthal equidistant not properly centered, slightly offset

oudeicrat opened this issue · 2 comments

I was trying to use some older version of d3 celestial with azimuthal equidistant projection and it worked fine except for an issue with daylight savings time, so I downloaded the newest version (0.7.28), but now it's rendered with an offset in such a way that the sky circle center is located in the top left corner of the container and I only see a quarter of the sky. I checked whether the demos exhibit the same issue and it seems they are a bit offset too, but not that much, check for example https://armchairastronautics.blogspot.com/p/skymap.html or https://ofrohn.github.io/celestial-demo/viewer.html and switch to azimuthal equidistant projection: the sky circle will be rendered too high, top of the circle will be cut off and there will be empty space below it. I checked in 4 browsers on 2 different systems.

Also I got a crash around line 1724 on Object.assign(res.planets.style,cfg.planets.symbolStyle); because res.planets didn't contain the style property. I temporarily fixed it with prepending if (typeof res.planets.style === 'undefined') res.planets.style = {};

You are correct, that was me not figuring out all the consequences of a change in canvas style settings.
Should be fixed in the latest version (0.7.29)

thanks!