Skip to content

Commit

Permalink
Merge 749f16d into cc1eb5d
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed Feb 28, 2021
2 parents cc1eb5d + 749f16d commit b667e2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion src/dagre-wrapper/edges.js
Expand Up @@ -350,14 +350,23 @@ export const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph)
const lineData = points.filter(p => !Number.isNaN(p.y));

// This is the accessor function we talked about above
let curve;
// Currently only flowcharts get the curve from the settings, perhaps this should
// be expanded to a common setting? Restricting it for now in order not to cause side-effects that
// have not been thought through
if (diagramType === 'graph' || diagramType === 'flowchart') {
curve = edge.curve || curveBasis;
} else {
curve = curveBasis;
}
const lineFunction = line()
.x(function(d) {
return d.x;
})
.y(function(d) {
return d.y;
})
.curve(curveBasis);
.curve(curve);

// Contruct stroke classes based on properties
let strokeClasses;
Expand Down
4 changes: 2 additions & 2 deletions src/defaultConfig.js
Expand Up @@ -184,9 +184,9 @@ const config = {
*| curve | Defines how mermaid renders curves for flowcharts. | String | Required | Basis, Linear, Cardinal|
*
***Notes:
*Default Vaue: Linear**
*Default Vaue: monotoneX**
*/
curve: 'linear',
curve: 'monotoneX',
// Only used in new experimental rendering
// represents the padding between the labels and the shape
padding: 15,
Expand Down

0 comments on commit b667e2a

Please sign in to comment.