continue;\r
}\r
\r
- value = av.alignment.getSequenceAt(i).findPosition(index);\r
+ value = seq.findPosition(index);\r
break;\r
}\r
if (value != -1)\r
int LABEL_WEST, LABEL_EAST;\r
public int getWrappedCanvasWidth(int cwidth)\r
{\r
+ cwidth -= cwidth % av.charWidth;\r
+\r
FontMetrics fm = getFontMetrics(av.getFont());\r
\r
LABEL_EAST = 0;\r
\r
FontMetrics fm = getFontMetrics(av.getFont());\r
\r
- int LABEL_EAST = 0;\r
\r
if (av.scaleRightWrapped)\r
{\r
LABEL_EAST = fm.stringWidth(getMask());\r
}\r
\r
- int LABEL_WEST = 0;\r
-\r
if (av.scaleLeftWrapped)\r
{\r
LABEL_WEST = fm.stringWidth(getMask());\r
\r
while ((ypos <= canvasHeight) && (startRes < av.alignment.getWidth()))\r
{\r
- endx = startRes + cWidth;\r
+ endx = startRes + cWidth -1;\r
\r
if (endx > al.getWidth())\r
{\r
if(annotations==null)\r
annotations = new AnnotationPanel(av);\r
\r
- annotations.drawComponent( g, startRes, endx );\r
+ annotations.drawComponent( g, startRes, endx+1 );\r
g.translate(0, -cHeight - ypos-4);\r
}\r
g.translate(-LABEL_WEST, 0);\r
groupIndex = 0;\r
}\r
\r
- if ( group != null)\r
+ if ( group != null )\r
{\r
do\r
{\r
boolean inGroup = false;\r
int top = -1;\r
int bottom = -1;\r
+ int alHeight = av.alignment.getHeight()-1;\r
\r
for (i = startSeq; i < endSeq; i++)\r
{\r
group.sequences.contains(av.alignment.getSequenceAt(\r
i)))\r
{\r
- if (bottom == -1)\r
+ if ( (bottom == -1) &&\r
+ (i >= alHeight ||\r
+ !group.sequences.contains(\r
+ av.alignment.getSequenceAt(i + 1))))\r
{\r
- if(i == endSeq-1 || // Dont check for i+1 if on the bottom row\r
- !group.sequences.contains(av.alignment.getSequenceAt(i+1 )))\r
-\r
bottom = sy + av.charHeight;\r
}\r
\r