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

Bug when specifying zoomlevel in config #113

Open
eisenfaust12 opened this issue Apr 26, 2021 · 1 comment
Open

Bug when specifying zoomlevel in config #113

eisenfaust12 opened this issue Apr 26, 2021 · 1 comment

Comments

@eisenfaust12
Copy link

Hi,

there appears to be a bug when specifying a zoomlevel in the config that is passed to Celestial.display where the size and exponent values for stars are not properly evaluated. The stars are rendered much too tiny. Take a look at the following two pictures. The first one didn't have a zoomlevel specified and I zoomed in manually with the mouse-wheel. The second one has a specified zoomlevel of 5.

Does Anyone have an idea how to fix this? Thanks!
good
bad

@eisenfaust12
Copy link
Author

Well, I seemingly "fixed" it by commenting out line 71 in Celestial.display in celestial.js , i.e.

  mapProjection = Celestial.projection(cfg.projection).rotate(rotation).translate([canvaswidth/2, canvasheight/2]).scale(scale * zoomlevel);
    
  zoom = d3.geo.zoom().projection(mapProjection).center([canvaswidth/2, canvasheight/2]).scaleExtent([scale, scale * zoomextent]).on("zoom.redraw", redraw);
  // Set initial zoom level
//  scale *= zoomlevel;

  var canvas = d3.select(parentElement).selectAll("canvas"),
      culture = (cfg.culture !== "" && cfg.culture !== "iau") ? cfg.culture : "";
  

But I don't understand the code well enough and I assume this line is there for a reason. Maybe you can have a look @ofrohn ?
Thanks!

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