endEditing();
if (av.getWrapAlignment())
{
- av.getRanges().scrollToWrappedVisible(seqCanvas.cursorX);
+ // scrollToWrappedVisible expects x-value to have hidden cols subtracted
+ int x = av.getAlignment().getHiddenColumns()
+ .findColumnPosition(seqCanvas.cursorX);
+ av.getRanges().scrollToWrappedVisible(x);
}
else
{
* the startRes changed, else false.
*
* @param res
- * residue position to scroll to
+ * residue position to scroll to NB visible position not absolute
+ * alignment position
* @return
*/
public boolean scrollToWrappedVisible(int res)
* Scroll so that (x,y) is visible. Fires a property change event.
*
* @param x
- * x position in alignment
+ * x position in alignment (absolute position)
* @param y
- * y position in alignment
+ * y position in alignment (absolute position)
*/
public void scrollToVisible(int x, int y)
{