From: amwaterhouse Date: Tue, 29 Aug 2006 15:31:04 +0000 (+0000) Subject: Can shrink graph to zero X-Git-Tag: Release_2_1_1~27 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ae282720c1bba85d9b52ebc2e85c6a9857b2c6db;p=jalview.git Can shrink graph to zero --- diff --git a/src/jalview/gui/AnnotationPanel.java b/src/jalview/gui/AnnotationPanel.java index 5ddca62..497fc2a 100755 --- a/src/jalview/gui/AnnotationPanel.java +++ b/src/jalview/gui/AnnotationPanel.java @@ -418,8 +418,8 @@ public class AnnotationPanel extends JPanel implements MouseListener, if(graphStretch>-1) { av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight += graphStretchY - evt.getY(); - if(av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight <10) - av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight = 10; + if(av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight <0) + av.alignment.getAlignmentAnnotation()[graphStretch].graphHeight = 0; graphStretchY = evt.getY(); adjustPanelHeight(); ap.repaint(); @@ -952,7 +952,7 @@ public class AnnotationPanel extends JPanel implements MouseListener, } } - if (row.graph>0) + if (row.graph>0 && row.graphHeight>0) { if(row.graph == AlignmentAnnotation.LINE_GRAPH ) {