- // convert x to residues - this is an absolute position
- // int xAsRes = Math.round((float) x * alwidth / width);
-
- // get viewport width in residues
- 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
- // absolute position
- // so convert back after getting visible region position
- // int visXAsRes = hiddenCols.findColumnPosition(xAsRes);
- int visXAsRes = xAsRes;
-
- // check in case we went off the edge of the alignment
- int visAlignWidth = hiddenCols.findColumnPosition(alwidth - 1);
- /* if (visXAsRes + vpwidth - 1 > visAlignWidth)
- {
- // went past the end of the alignment, adjust backwards
-
- // if last position was before the end of the alignment, need to update
- if (ranges.getEndRes() < visAlignWidth)
- {
- visXAsRes = hiddenCols.findColumnPosition(hiddenCols
- .subtractVisibleColumns(vpwidth - 1, alwidth - 1));
- }
- else
- {
- visXAsRes = ranges.getStartRes();
- }
- }*/
-
- //
- // Convert y value to sequence position
- //
-
- // convert y to residues
- // int yAsSeq = Math.round((float) y * alheight / sequencesHeight);
-
- // get viewport height in sequences
- int vpheight = ranges.getViewportHeight();