From 0519b6ad1c83e546640ce2b29db51a326503811f Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 16 Mar 2005 14:52:01 +0000 Subject: [PATCH] scale bug fixed --- src/jalview/gui/ScalePanel.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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)); -- 1.7.10.2