- if ((startv = av.getStartRes()) >= start)
- {
- /*
- * Scroll left to make start of search results visible
- */
- // setScrollValues(start - 1, seqIndex); // plus one residue
- setScrollValues(start, seqIndex);
- }
- else if ((endv = av.getEndRes()) <= end)
- {
- /*
- * Scroll right to make end of search results visible
- */
- // setScrollValues(startv + 1 + end - endv, seqIndex); // plus one
- setScrollValues(startv + end - endv, seqIndex);
- }
- else if ((starts = av.getStartSeq()) > seqIndex)
- {
- /*
- * Scroll up to make start of search results visible
- */
- setScrollValues(av.getStartRes(), seqIndex);
- }
- else if ((ends = av.getEndSeq()) <= seqIndex)
- {
- /*
- * Scroll down to make end of search results visible
- */
- setScrollValues(av.getStartRes(), starts + seqIndex - ends + 1);
- }