int xAsRes = Math.round((float) x * alwidth / width);
// get viewport width in residues
- int vpwidth = ranges.getEndRes() - ranges.getStartRes() + 1;
+ int vpwidth = ranges.getViewportWidth();
// get where x should be when accounting for hidden cols
// if x is in a hidden col region, shift to left - but we still need
int yAsSeq = Math.round((float) y * alheight / sequencesHeight);
// get viewport height in sequences
- // add 1 because height includes both endSeq and startSeq
- int vpheight = ranges.getEndSeq() - ranges.getStartSeq() + 1;
+ int vpheight = ranges.getViewportHeight();
// get where y should be when accounting for hidden rows
// if y is in a hidden row region, shift up - but we still need absolute