Skip to content

Commit ca594a3

Browse files
committed
CSSTUDIO-3341 Add explanatory comment.
1 parent 253f1a0 commit ca594a3

File tree

1 file changed

+3
-0
lines changed
  • app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx

1 file changed

+3
-0
lines changed

app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/JFXRepresentation.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,9 @@ else if (model.propHeight().getValue() > 0) {
542542
zoom_y_with_scrollbars = 1.0;
543543
}
544544

545+
// Round down the zoom-level in order to avoid situations where the
546+
// zoom-level is instead being rounded up, causing a scrollbar to
547+
// be displayed when a scrollbar is not needed.
545548
zoom_x_with_scrollbars_rounded = Math.floor(zoom_x_with_scrollbars * 1000.0) / 1000.0;
546549
zoom_x_without_scrollbars_rounded = Math.floor(zoom_x_without_scrollbars * 1000.0) / 1000.0;
547550
zoom_y_with_scrollbars_rounded = Math.floor(zoom_y_with_scrollbars * 1000.0) / 1000.0;

0 commit comments

Comments
 (0)