From c19101c85ca89622fa4a8beee526027e8aab53b8 Mon Sep 17 00:00:00 2001
From: cramakri <cramakri>
Date: Wed, 12 Dec 2012 12:10:43 +0000
Subject: [PATCH] BIS-229 SP-419 : Arrowheads at line ends.

SVN: 27916
---
 .../1/as/webapps/sample-graph/html/webapp.js     | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

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 28f751b1c9b..802a3a3f529 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
@@ -694,7 +694,20 @@ DagreGraphRenderer.prototype.draw = function()
 	viz = presenter.root.selectAll("svg").data([nodes]);
 	this.viz = viz;
 	// Code under enter is run if there is no HTML element for a data element
-	viz.enter().append("svg:svg").attr("class", "viz");
+	viz.enter().append("svg:svg")
+		.attr("class", "viz")
+		// Create an arrowhead to put to the lines
+		.append("svg:defs").append("svg:marker")
+			.attr("id", "arrowhead")
+			.attr("viewBox", "0 0 10 10")
+			.attr("refX", "8")
+			.attr("refY", "5")
+			.attr("markerUnits", "strokeWidth")
+			.attr("markerHeight", "5")
+			.attr("orient", "auto")
+			.style("fill", "#333")
+			.append("svg:path").attr("d", "M 0 0 L 10 5 L 0 10 z");
+
 	// Columns
 	this.columns = this.viz.selectAll("g.column").data(function(d) { return d });
 	this.columns.enter().append("svg:g").attr("class", "column");
@@ -827,6 +840,7 @@ DagreGraphRenderer.prototype.drawLinks = function()
 		.attr("pointer-events", "none")
 		.style("fill", "none")
 		.style("stroke-width", "1.5px")
+		.attr("marker-end", "url(#arrowhead)")
 		.transition()
 			.style("opacity", 1);
 	link.exit()
-- 
GitLab