Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,10 @@ private double updatePosX() {
final ScrollPane sp = getSkinnable();
double x = isReverseNodeOrientation() ? (hsb.getMax() - (posX - hsb.getMin())) : posX;
double hsbRange = hsb.getMax() - hsb.getMin();
double minX = hsbRange > 0 ? Math.min(-x / hsbRange * (nodeWidth - contentWidth), 0) : 0;
double minX = hsbRange > 0 ? -x / hsbRange * (nodeWidth - contentWidth) : 0;
if (!Properties.IS_TOUCH_SUPPORTED) {
minX = Math.min(minX, 0);
}
viewContent.setLayoutX(snapPositionX(minX));
if (!sp.hvalueProperty().isBound()) sp.setHvalue(Utils.clamp(sp.getHmin(), posX, sp.getHmax()));
return posX;
Expand All @@ -1180,7 +1183,10 @@ private double updatePosX() {
private double updatePosY() {
final ScrollPane sp = getSkinnable();
double vsbRange = vsb.getMax() - vsb.getMin();
double minY = vsbRange > 0 ? Math.min(-posY / vsbRange * (nodeHeight - contentHeight), 0) : 0;
double minY = vsbRange > 0 ? -posY / vsbRange * (nodeHeight - contentHeight) : 0;
if (!Properties.IS_TOUCH_SUPPORTED) {
minY = Math.min(minY, 0);
}
viewContent.setLayoutY(snapPositionY(minY));
if (!sp.vvalueProperty().isBound()) sp.setVvalue(Utils.clamp(sp.getVmin(), posY, sp.getVmax()));
return posY;
Expand Down