aboutsummaryrefslogtreecommitdiffstats
path: root/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java b/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java
index eb2d752be..bed4b33eb 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java
@@ -194,6 +194,9 @@ public class BoxLayout implements Group.Layout {
// IF isScaled: Uniform scale w/ lowest axis scale and center position on lower-scale axis
final float shapeWidthU = sbox.getWidth();
final float shapeHeightU = sbox.getHeight();
+ if( FloatUtil.isZero(shapeHeightU) || FloatUtil.isZero(shapeHeightU) ) {
+ continue;
+ }
final float sxy;
float dxh = 0, dyh = 0;
if( isScaled ) {
@@ -276,6 +279,9 @@ public class BoxLayout implements Group.Layout {
System.err.println("bl("+i+").x: "+box);
}
}
+ if( Float.isInfinite(box.getWidth()) || Float.isInfinite(box.getHeight()) ) {
+ box.resize(0, 0, 0);
+ }
if( TRACE_LAYOUT ) {
System.err.println("bl(X).x: "+box);
}