Commit da9f12a3 by mouly

Merge pull request #11 from MPR-Global/HDPDGI-79

show arrow pointing inwards for input tab
parents eb9eb4cf 2fa32eca
...@@ -196,6 +196,20 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco ...@@ -196,6 +196,20 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
'translate(' + margin.left + ',' + margin.right + ')'); 'translate(' + margin.left + ',' + margin.right + ')');
//arrow //arrow
svg.append("svg:defs").append("svg:marker").attr("id", "arrow").attr("viewBox", "0 0 10 10").attr("refX", 26).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 6).attr("markerHeight", 9).attr("orient", "auto").append("svg:path").attr("d", "M 0 0 L 10 5 L 0 10 z"); svg.append("svg:defs").append("svg:marker").attr("id", "arrow").attr("viewBox", "0 0 10 10").attr("refX", 26).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 6).attr("markerHeight", 9).attr("orient", "auto").append("svg:path").attr("d", "M 0 0 L 10 5 L 0 10 z");
//marker for input type graph
svg.append("svg:defs")
.append("svg:marker")
.attr("id", "input-arrow")
.attr("viewBox", "0 0 10 10")
.attr("refX", -15)
.attr("refY", 5)
.attr("markerUnits", "strokeWidth")
.attr("markerWidth", 6)
.attr("markerHeight", 9)
.attr("orient", "auto")
.append("svg:path")
.attr("d", "M -2 5 L 8 0 L 8 10 z");
var root = data; var root = data;
...@@ -269,7 +283,12 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco ...@@ -269,7 +283,12 @@ angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
//.style('stroke', function(d) { return d.target.level; }) //.style('stroke', function(d) { return d.target.level; })
.style('stroke', 'green') .style('stroke', 'green')
.attr('d', diagonal); .attr('d', diagonal);
link.attr("marker-end", "url(#arrow)");
if($scope.type === 'inputs') {
link.attr("marker-start", "url(#input-arrow)");//if input
} else {
link.attr("marker-end", "url(#arrow)");//if input
}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment