show arrow pointing inwards for input tab

Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/2fa32eca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/2fa32eca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/2fa32eca

Branch: refs/heads/master
Commit: 2fa32eca1774e51264266ea0143a291624e2bc06
Parents: 0e18270
Author: Mouly Kumar <[email protected]>
Authored: Mon Jun 15 21:50:23 2015 -0700
Committer: Mouly Kumar <[email protected]>
Committed: Mon Jun 15 21:50:23 2015 -0700

----------------------------------------------------------------------
 .../public/modules/lineage/lineageController.js | 21 +++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/2fa32eca/dashboard/v2/public/modules/lineage/lineageController.js
----------------------------------------------------------------------
diff --git a/dashboard/v2/public/modules/lineage/lineageController.js 
b/dashboard/v2/public/modules/lineage/lineageController.js
index daecccb..368e9a5 100755
--- a/dashboard/v2/public/modules/lineage/lineageController.js
+++ b/dashboard/v2/public/modules/lineage/lineageController.js
@@ -136,6 +136,20 @@ 
angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
                 'translate(' + margin.left + ',' + margin.right + ')');
             //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");
+            
+            //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;
 
@@ -199,7 +213,12 @@ 
angular.module('dgc.lineage').controller('LineageController', ['$element', '$sco
                     //.style('stroke', function(d) { return d.target.level; })
                     .style('stroke', 'green')
                     .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
+                }
 
             }
 

Reply via email to