From 37a4ec920d84214c4b3dd00a6c5fac702b224800 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Fri, 13 Aug 2010 22:19:51 +0000 Subject: [PATCH] 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 --- core/src/main/java/hudson/matrix/Layouter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/hudson/matrix/Layouter.java b/core/src/main/java/hudson/matrix/Layouter.java index f943e07f60..da01cd06c3 100644 --- a/core/src/main/java/hudson/matrix/Layouter.java +++ b/core/src/main/java/hudson/matrix/Layouter.java @@ -87,8 +87,11 @@ public abstract class Layouter { 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