altosui: keep sitemap more centred on rocket
authorAnthony Towns <aj@erisian.com.au>
Sun, 21 Nov 2010 19:29:26 +0000 (05:29 +1000)
committerAnthony Towns <aj@erisian.com.au>
Sun, 21 Nov 2010 19:29:26 +0000 (05:29 +1000)
ao-tools/altosui/AltosSiteMap.java

index 2477e4f85d462dffa9d23a5b871cd542dde55c27..8097060508989859c30ba1ee23efdfc76f549bb0 100644 (file)
@@ -317,7 +317,7 @@ public class AltosSiteMap extends JScrollPane implements AltosFlightDisplay {
                Point2D.Double copt = translatePoint(pt, tileCoordOffset(topleft));
                int dx = (int)copt.x - r.width/2 - r.x;
                int dy = (int)copt.y - r.height/2 - r.y;
-               if (Math.abs(dx) > r.width/3 || Math.abs(dy) > r.height/3) {
+               if (Math.abs(dx) > r.width/4 || Math.abs(dy) > r.height/4) {
                        r.x += dx;
                        r.y += dy;
                        comp.scrollRectToVisible(r);