Skip to content

Commit

Permalink
Merge branch 'master' of github.com:ecomfe/echarts
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Sep 3, 2018
2 parents d64c06e + ba7a252 commit d38ae04
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rules:
- 2
- "allow-null"
guard-for-in: 1
no-else-return: 1
no-else-return: 0
no-labels:
- 1
-
Expand All @@ -52,7 +52,7 @@ rules:
no-octal: 1
no-octal-escape: 1
no-proto: 2
no-redeclare: 1
no-redeclare: 0
no-self-compare: 2
no-unneeded-ternary: 2
no-with: 1
Expand Down Expand Up @@ -152,7 +152,7 @@ rules:
ignoreComments: true
max-params:
- 1
- 6
- 15

space-infix-ops: 2
dot-notation:
Expand Down
35 changes: 18 additions & 17 deletions src/chart/tree/TreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d38ae04

Please sign in to comment.