From: amwaterhouse Date: Wed, 16 Mar 2005 14:52:01 +0000 (+0000) Subject: scale bug fixed X-Git-Tag: Release_2_0~587 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=0519b6ad1c83e546640ce2b29db51a326503811f;p=jalview.git scale bug fixed --- diff --git a/src/jalview/gui/ScalePanel.java b/src/jalview/gui/ScalePanel.java index dc80d1b..b349b5b 100755 --- a/src/jalview/gui/ScalePanel.java +++ b/src/jalview/gui/ScalePanel.java @@ -134,14 +134,15 @@ public class ScalePanel extends JPanel int digits = (int)(Math.log(roughtick)/Math.log(10)); int num = (int)(roughtick/Math.pow(10,digits)); - if (Math.abs(10-num) < 3) + if (roughtick>5) num = 10; - else if (Math.abs(5-num) >= 2) + else num = 5; + // else // num = 2; - //System.out.println("Dig " + digits + " " + rough + " " + roughtick + " " + getWidth() + " " + num); + // System.out.println("Dig " + digits + " " + rough + " " + roughtick + " " + getWidth() + " " + num); int space = (int)(num * Math.pow(10,digits));