Permalink
Browse files

Scale is working better now. A bit of an ugly hack, but it'll do.

  • Loading branch information...
mezzoblue committed Nov 2, 2010
1 parent 9524cd7 commit 131d03a72a3ca803dbe77615a5038e52344e4819
Showing with 5 additions and 0 deletions.
  1. +5 −0 ui.pde
View
5 ui.pde
@@ -412,6 +412,11 @@ class uiScale {
// how many pixels between each km marker
kmInterval = (wide / kmScale) * (1000.00 / wide); // (1000 / 32.625) = 30.65
// adjust for larger window sizes by re-doing the scale calculation with the remainder of the window width minus 1000
int w = wide - 1000;
if (w <= 0) w = 1; // catch the minimum window size and adjust
kmScale += (w / (w * scene.drawingScale) * cos(scene.averageLat * PI / 180));
if (!scene.writePDF) {
pushMatrix();
translate(x, y);

0 comments on commit 131d03a

Please sign in to comment.