// Make sure we're not trying to draw a panel
// larger than the visible window
int scrollX = 0;
+ int scrollY = 0;
switch (eventName)
{
case SequenceGroup.SEQ_GROUP_CHANGED:
case ViewportRanges.STARTRESANDSEQ:
scrollX = ((int[]) evt.getNewValue())[0]
- ((int[]) evt.getOldValue())[0];
+ scrollY = ((int[]) evt.getNewValue())[1]
+ - ((int[]) evt.getOldValue())[1];
+
+ // System.out.println("SC dx dy " + scrollX + " " + scrollY);
+
+ if (scrollX != 0 && scrollY != 0)
+ {
+ // all sorts of problems in JavaScript if this is commented out.
+ repaint();
+ return;
+
+ }
break;
}
+
ViewportRanges vpRanges = av.getRanges();
int range = vpRanges.getEndRes() - vpRanges.getStartRes() + 1;
scrollX = Math.max(Math.min(scrollX, range), -range);
}
else
{
- fastPaint(scrollX, 0);
+ fastPaint(scrollX, scrollY);
}
// BH 2019.07.27 was: