diff options
| author | Alon Levy <alon@pobox.com> | 2014-12-06 22:54:56 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-06 22:54:56 +0200 |
| commit | 65f2db92de282047317dab0c4669c2c255328a2e (patch) | |
| tree | c500a4011f4dcadc9b150435c26f64a9102b1230 /src | |
| parent | 91eb1a580f1932d1ac0f40936ef2912afa8637e3 (diff) | |
Fix #187 - return edge directionality
Diffstat (limited to 'src')
| -rw-r--r-- | src/rz_core.js | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/src/rz_core.js b/src/rz_core.js index 28e448f8..d8c549a6 100644 --- a/src/rz_core.js +++ b/src/rz_core.js @@ -236,6 +236,19 @@ var initDrawingArea = function () { .append("g") .attr("class", "zoom"); + d3.select(el).select("svg").append("svg:defs") + .data(["end"]) // Different link/path types can be defined here + .append("svg:marker") // This section adds in the arrows + .attr("id", String) + .attr("viewBox", "0 -5 10 10") + .attr("refX", 22) + .attr("refY", -1.5) + .attr("markerWidth", 4) + .attr("markerHeight", 4) + .attr("orient", "auto") + .append("svg:path") + .attr("d", "M0,-5L10,0L0,5"); + /* * init zoom behavior */ @@ -343,22 +356,6 @@ function update_view__graph(no_relayout) { link_g = link.enter().append('g') .attr('class', 'link graph'); - link_g.append("svg:defs").selectAll("marker") - .data(["end"]) // Different link/path types can be defined here - .append("svg:marker") // This section adds in the arrows - .attr("id", String) - .attr("viewBox", "0 -5 10 10") - .attr("refX", 22) - .attr("refY", -1.5) - .attr("markerWidth", 4) - .attr("markerHeight", 4) - .attr("orient", "auto") - .attr("class", function(d) { - return selection.selected_class(d); - }) - .append("svg:path") - .attr("d", "M0,-5L10,0L0,5"); - link_g.append("path") .attr("class", function(d) { return d.state + ' link graph'; |
