Improved the layout algorithm of the matrix project visualization.

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@33802 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2010-08-13 22:19:51 +00:00
1 parent ff47b97fd3
commit 37a4ec920d
1 file changed
+5 -2
@@ -87,8 +87,11 @@ public abstract class Layouter<T> {
z.add(nonTrivialAxes.get(0));
break;
case 2:
x.add(nonTrivialAxes.get(0));
y.add(nonTrivialAxes.get(1));
// use the longer axis in Y
Axis a = nonTrivialAxes.get(0);
Axis b = nonTrivialAxes.get(1);
x.add(a.size() > b.size() ? b : a);
y.add(a.size() > b.size() ? a : b);
break;
default:
// for size > 3, use x and y, and try to pack y more