d3-celestial icon indicating copy to clipboard operation
d3-celestial copied to clipboard

Rendering ra/dec labels after changing the map date/location

Open timbeccue opened this issue 4 years ago • 0 comments

Hello, I have an issue related to readable ra/dec labels after rotating the map. I encounter the problem when initializing the map, and also when using Celestial.location or Celestial.date.

On calling Celestial.display(config), the map will render first at geopos==[0,0] and then rotate to geopos=<desired location>. However, the lat/lon labels render right away at geopos==[0,0] and then rotate away from the desired location. This often results in unreadable labels.

Here is a working example demonstrating the issue: https://codesandbox.io/s/vue-d3-celestial-coordinates-rendering-bug-b7q2h?file=/src/App.vue

Here's the result I'm trying to avoid. Screen Shot 2021-11-04 at 3 41 00 PM

This is the result I would like. Screen Shot 2021-11-04 at 3 42 46 PM Is there some method I can call to reset the lat/lon label positions after the map changes its view?

timbeccue avatar Nov 04 '21 22:11 timbeccue