{
av.setStartSeq(offy);
av.setEndSeq(offy + seqPanel.seqCanvas.getSize().height
- / av.getCharHeight());
+ / av.getCharHeight() - 1);
}
}
}
else
{
- transY = imgHeight - vertical * av.getCharHeight();
+ transY = imgHeight - ((vertical + 1) * av.getCharHeight());
}
}
else if (vertical < 0)
{
// Now draw the id strings
SequenceI seq;
- for (int i = starty; i < endy; i++)
+ for (int i = starty; i <= endy; i++)
{
seq = av.getAlignment().getSequenceAt(i);
}
else
{
- transY = imgHeight - vertical * avcharHeight;
+ transY = imgHeight - ((vertical + 1) * avcharHeight);
}
}
else if (vertical < 0)
// / First draw the sequences
// ///////////////////////////
- for (int i = startSeq; i < endSeq; i++)
+ for (int i = startSeq; i <= endSeq; i++)
{
nextSeq = av.getAlignment().getSequenceAt(i);
int bottom = -1;
int alHeight = av.getAlignment().getHeight() - 1;
- for (i = startSeq; i < endSeq; i++)
+ for (i = startSeq; i <= endSeq; i++)
{
sx = (group.getStartRes() - startRes) * avcharWidth;
sy = offset + ((i - startSeq) * avcharHeight);
{
av.setStartSeq(offy);
av.setEndSeq(offy
- + (getSeqPanel().seqCanvas.getHeight() / av.getCharHeight()));
+ + (getSeqPanel().seqCanvas.getHeight() / av.getCharHeight())
+ - 1);
}
}
}
else
{
- transY = imgHeight - (vertical * av.getCharHeight());
+ transY = imgHeight - ((vertical + 1) * av.getCharHeight());
}
}
- else if (vertical < 0)
+ else if (vertical < 0) // scroll up
{
es = ss - vertical;
SequenceI sequence;
// Now draw the id strings
- for (int i = starty; i < endy; i++)
+ for (int i = starty; i <= endy; i++)
{
sequence = av.getAlignment().getSequenceAt(i);
}
else
{
- transY = imgHeight - (vertical * charHeight);
+ transY = imgHeight - ((vertical + 1) * charHeight);
}
}
else if (vertical < 0)
// / First draw the sequences
// ///////////////////////////
- for (int i = startSeq; i < endSeq; i++)
+ for (int i = startSeq; i <= endSeq; i++)
{
nextSeq = av.getAlignment().getSequenceAt(i);
if (nextSeq == null)
int top = -1;
int bottom = -1;
- for (i = startSeq; i < endSeq; i++)
+ for (i = startSeq; i <= endSeq; i++)
{
sx = (group.getStartRes() - startRes) * charWidth;
sy = offset + ((i - startSeq) * charHeight);