From 33d39ad21ac4ee6e746436318a6ab675f743dd0e Mon Sep 17 00:00:00 2001
From: cramakri <cramakri>
Date: Thu, 14 Nov 2013 14:28:00 +0000
Subject: [PATCH] BIS-549 SP-1006 : Show the level header at a better location.

SVN: 30150
---
 .../1/as/webapps/sample-graph/html/webapp.js                  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/deep_sequencing_unit/source/core-plugins/ngs-sample-overview-graph/1/as/webapps/sample-graph/html/webapp.js b/deep_sequencing_unit/source/core-plugins/ngs-sample-overview-graph/1/as/webapps/sample-graph/html/webapp.js
index ce937e5d3a7..f6ba20ac71d 100644
--- a/deep_sequencing_unit/source/core-plugins/ngs-sample-overview-graph/1/as/webapps/sample-graph/html/webapp.js
+++ b/deep_sequencing_unit/source/core-plugins/ngs-sample-overview-graph/1/as/webapps/sample-graph/html/webapp.js
@@ -803,8 +803,8 @@ DagreGraphRenderer.prototype.drawHeaders = function()
 			var nodesAtLevel = sampleNodeGroup[i];
 			if (nodesAtLevel.length < 1) return 0;
 			if (!nodesAtLevel[0]) return 0;
-			var dagre = nodesAtLevel[0].__data__.dagre;
-			return dagre.y + dagre.height - 1;
+			var dagre = nodesAtLevel.filter(function(d) { return d != null }).map(function(d) { return d.__data__.dagre });
+			return d3.min(dagre, function(d) { return d.y + d.height }) - 1;
 		})
 		.attr("opacity", function(d, i) {
 			var nodesAtLevel = sampleNodeGroup[i];
-- 
GitLab