+ int xAsRes = getLeftXFromCentreX(mousex, hiddenCols);
+ int yAsSeq = getTopYFromCentreY(mousey, hiddenSeqs);
+
+ updateViewportFromTopLeft(xAsRes, yAsSeq, hiddenSeqs, hiddenCols);
+
+ }
+
+ @Override
+ public void adjustViewportFromMouse(int mousex, int mousey,
+ HiddenSequences hiddenSeqs, HiddenColumns hiddenCols)
+ {
+ resetAlignmentDims();
+
+ // calculate translation in pixel terms:
+ // get mouse location in viewport coords, add translation in viewport
+ // coords, and update viewport as usual
+ int vpx = Math.round(mousex * widthRatio);
+ int vpy = Math.round(mousey * heightRatio);
+
+ updateViewportFromTopLeft(vpx + xdiff, vpy + ydiff, hiddenSeqs,
+ hiddenCols);