diff options
author | Anthony Towns <aj@erisian.com.au> | 2010-11-22 05:22:17 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2010-11-22 05:22:17 +1000 |
commit | b85df38b5611e45cb9296df07b720badf74ac26e (patch) | |
tree | 8f4092433dbdfeeb23483301d99b15dc857ff4f5 /ao-tools/altosui/AltosSiteMapTile.java | |
parent | 4a9ded5b39ed08e13abc2cddba8b712f62b983f2 (diff) |
altosui: improve sitemap scrolling behaviour
Diffstat (limited to 'ao-tools/altosui/AltosSiteMapTile.java')
-rw-r--r-- | ao-tools/altosui/AltosSiteMapTile.java | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/ao-tools/altosui/AltosSiteMapTile.java b/ao-tools/altosui/AltosSiteMapTile.java index e0942986..8301f42b 100644 --- a/ao-tools/altosui/AltosSiteMapTile.java +++ b/ao-tools/altosui/AltosSiteMapTile.java @@ -54,13 +54,6 @@ public class AltosSiteMapTile extends JLayeredPane { private boolean drawn_landed_circle = false; private boolean drawn_boost_circle = false; - private boolean scrollable = false; - public synchronized void setScrollable() { - scrollable = true; - } - public synchronized boolean isScrollable() { - return scrollable; - } public synchronized void show(AltosState state, int crc_errors, Point2D.Double last_pt, Point2D.Double pt) { @@ -69,20 +62,6 @@ public class AltosSiteMapTile extends JLayeredPane { } g2d.draw(new Line2D.Double(last_pt, pt)); - int px_size = getWidth(); - if (isScrollable() && 0 <= pt.x && pt.x < px_size) { - if (0 <= pt.y && pt.y < px_size) { - int dx = 500, dy = 250; - if (state.state > 2) { - dx = Math.min(200, 20 + (int) Math.abs(last_pt.x - pt.x)); - dy = Math.min(100, 10 + (int) Math.abs(last_pt.y - pt.y)); - } - Rectangle r = new Rectangle((int)pt.x-dx, (int)pt.y-dy, - dx*2, dy*2); - scrollRectToVisible(r); - } - } - if (state.state == 3 && !drawn_boost_circle) { drawn_boost_circle = true; g2d.setColor(Color.RED); |