* ensuring a part height includes at least one sequence
*/
ViewportRanges ranges = av.getRanges();
- int xMax = ranges.getVisibleAlignmentWidth();
wrappedVisibleWidths = canvasHeight / wrappedRepeatHeightPx;
int remainder = canvasHeight % wrappedRepeatHeightPx;
if (remainder >= (wrappedSpaceAboveAlignment + charHeight))
/*
* limit visibleWidths to not exceed width of alignment
*/
- int maxWidths = (xMax - ranges.getStartRes()) / wrappedWidthInResidues;
- if (xMax % wrappedWidthInResidues > 0)
+ int xMax = ranges.getVisibleAlignmentWidth();
+ int startToEnd = xMax - ranges.getStartRes();
+ int maxWidths = startToEnd / wrappedWidthInResidues;
+ if (startToEnd % wrappedWidthInResidues > 0)
{
maxWidths++;
}
}
/**
+ * Draws markers (triangles) above hidden column positions between startColumn
+ * and endColumn.
+ *
* @param g
* @param ypos
* @param startColumn
{
int res = pos - startColumn;
- if (res < 0 || res > endColumn - startColumn)
+ if (res < 0 || res > endColumn - startColumn + 1)
{
continue;
}
// larger than the visible window
ViewportRanges vpRanges = av.getRanges();
scrollX = (int) evt.getNewValue() - (int) evt.getOldValue();
- int range = vpRanges.getEndRes() - vpRanges.getStartRes();
+ int range = vpRanges.getEndRes() - vpRanges.getStartRes() + 1;
if (scrollX > range)
{
scrollX = range;