Merge branch 'develop' into feature/JAL-3364splitFrameImage
[jalview.git] / src / jalview / gui / IdCanvas.java
index cf88c90..23d2d78 100755 (executable)
@@ -380,32 +380,28 @@ public class IdCanvas extends JPanel implements ViewportListenerI
     int alignmentWidth = alignViewport.getAlignment().getWidth();
     final int alheight = alignViewport.getAlignment().getHeight();
 
-    if (alignViewport.hasHiddenColumns())
+    int annotationHeight = 0;
+
+    final int charHeight = alignViewport.getCharHeight();
+    int hgap = charHeight;
+    if (alignViewport.getScaleAboveWrapped())
     {
-      alignmentWidth = alignViewport.getAlignment().getHiddenColumns()
-              .absoluteToVisibleColumn(alignmentWidth) - 1;
+      hgap += charHeight;
     }
 
-    int annotationHeight = 0;
-
     AnnotationLabels labels = null;
     if (alignViewport.isShowAnnotation())
     {
+      hgap += SeqCanvas.SEQS_ANNOTATION_GAP;
       if (ap == null)
       {
         ap = new AnnotationPanel(alignViewport);
       }
-      annotationHeight = ap.adjustPanelHeight();
+      annotationHeight = ap.adjustPanelHeight()
+              + SeqCanvas.SEQS_ANNOTATION_GAP;
       labels = new AnnotationLabels(alignViewport);
     }
 
-    final int charHeight = alignViewport.getCharHeight();
-    int hgap = charHeight;
-    if (alignViewport.getScaleAboveWrapped())
-    {
-      hgap += charHeight;
-    }
-
     /*
      * height of alignment + gap + annotations (if shown)
      */