Skip to content

Commit

Permalink
Change edge.lineCurve to edge.curve to match D3.js and update samples (
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jan 18, 2018
1 parent a705803 commit a488edc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions demo/graph-story-board.html
Expand Up @@ -143,12 +143,12 @@
break;
case 'AddCoherenceEdge':
this.g.setEdge(x[1], x[2], {
lineInterpolate: d3.curveBasis
curve: d3.curveBasis
});
break;
case 'AddDependencyEdge':
this.g.setEdge(x[1], x[2], {
lineInterpolate: d3.curveBasis
curve: d3.curveBasis
,label: 'added'
,labeloffset: 5
,labelpos: 'l'
Expand All @@ -157,7 +157,7 @@
case 'MakeRedundantEdge':
this.g.setEdge(x[1], x[2], {
style: "stroke: #aaa; stroke-dasharray: 5, 10;"
,lineInterpolate: d3.curveBasis
,curve: d3.curveBasis
,arrowheadStyle: "fill: #aaa"
,labelpos: 'c'
,label: 'pruned'
Expand Down
2 changes: 1 addition & 1 deletion demo/style-attrs.html
Expand Up @@ -76,7 +76,7 @@ <h1>Dagre D3 Demo: Style Attributes</h1>
// see available options for lineInterpolate here: https://github.com/mbostock/d3/wiki/SVG-Shapes#line_interpolate
g.setEdge("A", "D", {
label: "line interpolation different",
lineInterpolate: d3.curveBasis
curve: d3.curveBasis
});

g.setEdge("E", "D", {});
Expand Down
2 changes: 1 addition & 1 deletion lib/create-edge-paths.js
Expand Up @@ -82,7 +82,7 @@ function createLine(edge, points) {
.x(function(d) { return d.x; })
.y(function(d) { return d.y; });

line.curve(edge.lineCurve);
line.curve(edge.curve);

return line(points);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/render.js
Expand Up @@ -90,7 +90,7 @@ var NODE_DEFAULT_ATTRS = {

var EDGE_DEFAULT_ATTRS = {
arrowhead: "normal",
lineCurve: d3.curveLinear
curve: d3.curveLinear
};

function preProcessGraph(g) {
Expand Down

0 comments on commit a488edc

Please sign in to comment.