From ae282720c1bba85d9b52ebc2e85c6a9857b2c6db Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Tue, 29 Aug 2006 15:31:04 +0000 Subject: [PATCH] Can shrink graph to zero --- src/jalview/gui/AnnotationPanel.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ) { -- 1.7.10.2