scale bug fixed
authoramwaterhouse <Andrew Waterhouse>
Wed, 16 Mar 2005 14:52:01 +0000 (14:52 +0000)
committeramwaterhouse <Andrew Waterhouse>
Wed, 16 Mar 2005 14:52:01 +0000 (14:52 +0000)
src/jalview/gui/ScalePanel.java

index dc80d1b..b349b5b 100755 (executable)
@@ -134,14 +134,15 @@ public class ScalePanel extends JPanel
     int   digits  = (int)(Math.log(roughtick)/Math.log(10));\r
     int   num     = (int)(roughtick/Math.pow(10,digits));\r
 \r
-    if (Math.abs(10-num) < 3)\r
+    if (roughtick>5)\r
         num = 10;\r
-    else if (Math.abs(5-num) >= 2)\r
+    else\r
         num = 5;\r
+\r
   //   else\r
   //  num = 2;\r
 \r
-    //System.out.println("Dig " + digits + " " + rough + " " + roughtick + " " + getWidth() + " " + num);\r
+  //  System.out.println("Dig " + digits + " " + rough + " " + roughtick + " " + getWidth() + " " + num);\r
 \r
     int space = (int)(num * Math.pow(10,digits));\r
 \r