Lines 402-409
Link Here
|
402 |
scrollToY(y); |
402 |
scrollToY(y); |
403 |
else if (y == getViewport().getViewLocation().y) |
403 |
else if (y == getViewport().getViewLocation().y) |
404 |
scrollToX(x); |
404 |
scrollToX(x); |
405 |
else |
405 |
else { |
406 |
getViewport().setViewLocation(x, y); |
406 |
Dimension size = viewport.getSize(); |
|
|
407 |
int deltaX = x - getViewport().getViewLocation().x; |
408 |
int deltaY = y - getViewport().getViewLocation().y; |
409 |
if (deltaX < size.width && deltaY < size.height) { |
410 |
scrollToX(x); |
411 |
scrollToY(y); |
412 |
} else { |
413 |
getViewport().setViewLocation(x, y); |
414 |
} |
415 |
} |
407 |
} |
416 |
} |
408 |
|
417 |
|
409 |
/** |
418 |
/** |