image is panel size
authoramwaterhouse <Andrew Waterhouse>
Mon, 5 Feb 2007 10:57:20 +0000 (10:57 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 5 Feb 2007 10:57:20 +0000 (10:57 +0000)
src/jalview/appletgui/AnnotationPanel.java

index 10047fd..172211e 100755 (executable)
@@ -213,7 +213,8 @@ public class AnnotationPanel
   public void paint(Graphics g)\r
   {\r
 \r
-    imgWidth = (av.endRes - av.startRes + 1) * av.charWidth;\r
+    imgWidth = getSize().width;\r
+        //(av.endRes - av.startRes + 1) * av.charWidth;\r
 \r
     if (image == null || imgWidth != image.getWidth(this))\r
     {\r
@@ -285,7 +286,7 @@ public class AnnotationPanel
 \r
 \r
       g.setColor(Color.white);\r
-      g.fillRect(0, 0, (endRes - startRes) * av.charWidth, getSize().height);\r
+      g.fillRect(0, 0, getSize().width, getSize().height);\r
 \r
       if ((av.alignment.getAlignmentAnnotation() == null) ||\r
               (av.alignment.getAlignmentAnnotation().length < 1))\r