diff --git a/src/main/java/org/fxmisc/flowless/VirtualFlow.java b/src/main/java/org/fxmisc/flowless/VirtualFlow.java index d72caf6..b49957a 100644 --- a/src/main/java/org/fxmisc/flowless/VirtualFlow.java +++ b/src/main/java/org/fxmisc/flowless/VirtualFlow.java @@ -523,7 +523,7 @@ void setLengthOffset(double pixels) { double total = totalLengthEstimateProperty().getOrElse(0.0); double length = sizeTracker.getViewportLength(); double max = Math.max(total - length, 0); - double current = lengthOffsetEstimate.getValue(); + double current = Math.round(lengthOffsetEstimate.getValue()); if(pixels > max) pixels = max; if(pixels < 0) pixels = 0;