Can shrink graph to zero
authoramwaterhouse <Andrew Waterhouse>
Tue, 29 Aug 2006 15:31:04 +0000 (15:31 +0000)
committeramwaterhouse <Andrew Waterhouse>
Tue, 29 Aug 2006 15:31:04 +0000 (15:31 +0000)
src/jalview/gui/AnnotationPanel.java

index 5ddca62..497fc2a 100755 (executable)
@@ -418,8 +418,8 @@ public class AnnotationPanel extends JPanel implements MouseListener,
       if(graphStretch>-1)\r
       {\r
         av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY - evt.getY();\r
-        if(av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight <10)\r
-          av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight = 10;\r
+        if(av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight <0)\r
+          av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight = 0;\r
         graphStretchY = evt.getY();\r
         adjustPanelHeight();\r
         ap.repaint();\r
@@ -952,7 +952,7 @@ public class AnnotationPanel extends JPanel implements MouseListener,
               }\r
           }\r
 \r
-            if (row.graph>0)\r
+            if (row.graph>0 && row.graphHeight>0)\r
             {\r
                 if(row.graph == AlignmentAnnotation.LINE_GRAPH )\r
                 {\r