diff --git a/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/JFXRepresentation.java b/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/JFXRepresentation.java index 75bc3f2c12..079008048a 100644 --- a/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/JFXRepresentation.java +++ b/app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/JFXRepresentation.java @@ -516,7 +516,7 @@ else if (scrollBar.isVisible() && scrollBar.getOrientation() == Orientation.VERT // correct width/height properties. final double zoomXWithoutScrollbars, zoomYWithoutScrollbars; final double zoomXWithScrollbars, zoomYWithScrollbars; - if (outline.getWidth() > layoutBoundsWithScrollbars.getWidth()) { + if (outline.getWidth() > layoutBoundsWithoutScrollbars.getWidth()) { zoomXWithoutScrollbars = layoutBoundsWithoutScrollbars.getWidth() / outline.getWidth(); zoomXWithScrollbars = layoutBoundsWithScrollbars.getWidth() / outline.getWidth(); } @@ -529,7 +529,7 @@ else if (model.propWidth().getValue() > 0) { zoomXWithScrollbars = 1.0; } - if (outline.getHeight() > layoutBoundsWithScrollbars.getHeight()) { + if (outline.getHeight() > layoutBoundsWithoutScrollbars.getHeight()) { zoomYWithoutScrollbars = layoutBoundsWithoutScrollbars.getHeight() / outline.getHeight(); zoomYWithScrollbars = layoutBoundsWithScrollbars.getHeight() / outline.getHeight(); }