aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java13
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java13
2 files changed, 4 insertions, 22 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 3bfa2b27f..80d9d0d50 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/layout/BoxLayout.java
@@ -261,19 +261,10 @@ public class BoxLayout implements Group.Layout {
diffBL.setX(0); // only adjust negative if !center-horiz
}
diffBL.scale(s.getScale()).scale(-1f);
- s.move( diffBL.scale(sxy) );
- } else if( diffBL.x() < 0 || diffBL.y() < 0 ) {
- if( diffBL.x() > 0 ) {
- diffBL.setX(0);
- }
- if( diffBL.y() > 0 ) {
- diffBL.setY(0);
- }
- diffBL.scale(s.getScale()).scale(-1f);
- s.move( diffBL.scale(sxy) );
} else {
- diffBL.set(0, 0, 0);
+ diffBL.min(new Vec3f()).scale(s.getScale()).scale(-1f);
}
+ s.move( diffBL.scale(sxy) );
if( TRACE_LAYOUT ) {
System.err.println("bl("+i+").bl: sbox0 "+s.getBounds()+", diffBL_ "+diffBL);
}
diff --git a/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java b/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java
index 9a90160d5..8175a8daf 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/layout/GridLayout.java
@@ -335,19 +335,10 @@ public class GridLayout implements Group.Layout {
diffBL.setX(0); // only adjust negative if !center-horiz
}
diffBL.scale(s.getScale()).scale(-1f);
- s.move( diffBL.scale(sxy) );
- } else if( diffBL.x() < 0 || diffBL.y() < 0 ) {
- if( diffBL.x() > 0 ) {
- diffBL.setX(0);
- }
- if( diffBL.y() > 0 ) {
- diffBL.setY(0);
- }
- diffBL.scale(s.getScale()).scale(-1f);
- s.move( diffBL.scale(sxy) );
} else {
- diffBL.set(0, 0, 0);
+ diffBL.min(new Vec3f()).scale(s.getScale()).scale(-1f);
}
+ s.move( diffBL.scale(sxy) );
if( TRACE_LAYOUT ) {
System.err.println("gl("+i+")["+col_i+"]["+row_i+"].bl: sbox0 "+s.getBounds()+", diffBL_ "+diffBL);
}