You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by su...@apache.org on 2018/09/03 04:56:13 UTC

[incubator-echarts] 03/03: reverse code style since eslintrc modified.

This is an automated email from the ASF dual-hosted git repository.

sushuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git

commit ba7a25246c9a6a8770c98207fc03cc689327548c
Author: sushuang <su...@gmail.com>
AuthorDate: Mon Sep 3 12:16:37 2018 +0800

    reverse code style since eslintrc modified.
---
 src/chart/tree/TreeView.js | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)

diff --git a/src/chart/tree/TreeView.js b/src/chart/tree/TreeView.js
index 86b022a..9ded9dd 100644
--- a/src/chart/tree/TreeView.js
+++ b/src/chart/tree/TreeView.js
@@ -467,23 +467,24 @@ function getEdgeShape(seriesScope, sourceLayout, targetLayout) {
             cpy2: radialCoor3.y
         };
     }
-
-    x1 = sourceLayout.x;
-    y1 = sourceLayout.y;
-    x2 = targetLayout.x;
-    y2 = targetLayout.y;
-
-    if (orient === 'LR' || orient === 'RL') {
-        cpx1 = x1 + (x2 - x1) * seriesScope.curvature;
-        cpy1 = y1;
-        cpx2 = x2 + (x1 - x2) * seriesScope.curvature;
-        cpy2 = y2;
-    }
-    if (orient === 'TB' || orient === 'BT') {
-        cpx1 = x1;
-        cpy1 = y1 + (y2 - y1) * seriesScope.curvature;
-        cpx2 = x2;
-        cpy2 = y2 + (y1 - y2) * seriesScope.curvature;
+    else {
+        x1 = sourceLayout.x;
+        y1 = sourceLayout.y;
+        x2 = targetLayout.x;
+        y2 = targetLayout.y;
+
+        if (orient === 'LR' || orient === 'RL') {
+            cpx1 = x1 + (x2 - x1) * seriesScope.curvature;
+            cpy1 = y1;
+            cpx2 = x2 + (x1 - x2) * seriesScope.curvature;
+            cpy2 = y2;
+        }
+        if (orient === 'TB' || orient === 'BT') {
+            cpx1 = x1;
+            cpy1 = y1 + (y2 - y1) * seriesScope.curvature;
+            cpx2 = x2;
+            cpy2 = y2 + (y1 - y2) * seriesScope.curvature;
+        }
     }
 
     return {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org