7d1ecf6c3cb9ccced03ba0f0a377be765b296811 max Sat Apr 13 18:04:08 2024 -0700 moving by at least one bp when user uses arrow the bars, second try, the first one failed miserably, refs #23343 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index a3544c8..77dbd82 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -9709,32 +9709,34 @@ { long offset; long newStart, newEnd; if (revCmplDisp) amount = -amount; offset = (long)(amount * virtWinBaseCount); /* Make sure don't scroll of ends. */ newStart = virtWinStart + offset; newEnd = virtWinEnd + offset; if (newStart < 0) offset = -virtWinStart; else if (newEnd > virtSeqBaseCount) offset = virtSeqBaseCount - virtWinEnd; // at high zoom levels, offset can be very small: make sure that we scroll at least one bp -if (offset < 1.0) - offset = 1.0; +if (amount > 0 && offset==0) + offset = 1; +if (amount < 0 && offset==0) + offset = -1; /* Move window. */ virtWinStart += offset; virtWinEnd += offset; } void dinkWindow(boolean start, long dinkAmount) /* Move one end or other of window a little. */ { if (revCmplDisp) { start = !start; dinkAmount = -dinkAmount; } if (start)