File tree Expand file tree Collapse file tree
src/main/java/org/fxmisc/flowless Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 * VirtualizedScrollPane<ScaledVirtualized> vsPane = new VirtualizedScrollPane(wrapper);
1818 *
1919 * // To scale actualContent without also scaling vsPane's scrollbars:
20- * wrapper.scaleProperty ().setY(3);
21- * wrapper.scaleProperty ().setX(2);
20+ * wrapper.getZoom ().setY(3);
21+ * wrapper.getZoom ().setX(2);
2222 * }
2323 * </pre>
2424 *
@@ -51,13 +51,13 @@ public ScaledVirtualized(V content) {
5151 );
5252 estScrollX = Var .mapBidirectional (
5353 content .estimatedScrollXProperty (),
54- scrollX -> scrollX * zoom .getX (),
55- scrollX -> scrollX / zoom .getX ()
54+ scrollX -> ( double ) Math . round ( scrollX * zoom .getX () ),
55+ scrollX -> ( double ) Math . round ( scrollX / zoom .getX () )
5656 );
5757 estScrollY = Var .mapBidirectional (
5858 content .estimatedScrollYProperty (),
59- scrollY -> scrollY * zoom .getY (),
60- scrollY -> scrollY / zoom .getY ()
59+ scrollY -> ( double ) Math . round ( scrollY * zoom .getY () ),
60+ scrollY -> ( double ) Math . round ( scrollY / zoom .getY () )
6161 );
6262
6363 zoom .xProperty () .addListener ((obs , ov , nv ) -> requestLayout ());
You can’t perform that action at this time.
0 commit comments