final AlignmentI bottomAlignment = bottomViewport.getAlignment();
boolean topAnnotations = topViewport.isShowAnnotation();
boolean bottomAnnotations = bottomViewport.isShowAnnotation();
+ // TODO need number of visible sequences here, not #sequences - how?
int topCount = topAlignment.getHeight();
int bottomCount = bottomAlignment.getHeight();
int topCharHeight = topViewport.getViewStyle().getCharHeight();
+ (bottomAnnotations ? bottomViewport.calcPanelHeight() : 0);
double ratio = ((double) topHeight) / (topHeight + bottomHeight);
+ /*
+ * limit to 0.2 <= ratio <= 0.8 to avoid concealing all sequences
+ */
+ ratio = Math.min(ratio, 0.8d);
+ ratio = Math.max(ratio, 0.2d);
setRelativeDividerLocation(ratio);
}