From 53b97b3ffaec6166c1b186bd8c1b99b7beb9b46b Mon Sep 17 00:00:00 2001 From: Tyler Long Date: Fri, 9 Mar 2018 13:46:58 +0800 Subject: [PATCH] Refactor code --- src/diagrams/flowchart/flowRenderer.js | 6 ++---- todo.md | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/diagrams/flowchart/flowRenderer.js b/src/diagrams/flowchart/flowRenderer.js index caef0f6096..47fa5be3a3 100644 --- a/src/diagrams/flowchart/flowRenderer.js +++ b/src/diagrams/flowchart/flowRenderer.js @@ -176,10 +176,8 @@ export const addEdges = function (edges, g) { if (typeof edge.interpolate !== 'undefined') { edgeData.lineInterpolate = edge.interpolate - } else { - if (typeof edges.defaultInterpolate !== 'undefined') { - edgeData.lineInterpolate = edges.defaultInterpolate - } + } else if (typeof edges.defaultInterpolate !== 'undefined') { + edgeData.lineInterpolate = edges.defaultInterpolate } if (typeof edge.text === 'undefined') { diff --git a/todo.md b/todo.md index 568bf7e756..a6305e67c9 100644 --- a/todo.md +++ b/todo.md @@ -6,10 +6,9 @@ - rewrite less code - Setup code coverage - Create a desktop client -- Fix flowchart interpolate/curve issue - - not a common feature so dist/index.html cannot reproduce this issue - Support customization of gantt diagram xAxis format - https://github.com/d3/d3-time-format#api-reference - https://bl.ocks.org/wboykinm/34627426d84f3242e0e6ecb2339e9065 - Upgrade jasmine to latest version or replace it - Upgrade less to latest version or replace it +- Flowchart interpolate is useless because there is no rendering code using it