You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/08/13 11:10:51 UTC

[GitHub] chfw commented on a change in pull request #8425: new

chfw commented on a change in pull request #8425: new
URL: https://github.com/apache/incubator-echarts/pull/8425#discussion_r209570955
 
 

 ##########
 File path: src/chart/sankey/SankeyView.js
 ##########
 @@ -150,10 +149,23 @@ export default echarts.extendChartView({
             var y1 = (dragY1 != null ? dragY1 * height : n1Layout.y) + edgeLayout.sy + edgeLayout.dy / 2;
             var x2 = dragX2 != null ? dragX2 * width : n2Layout.x;
             var y2 = (dragY2 != null ? dragY2 * height : n2Layout.y) + edgeLayout.ty + edgeLayout.dy / 2;
-            var cpx1 = x1 * (1 - curvature) + x2 * curvature;
-            var cpy1 = y1;
-            var cpx2 = x1 * curvature + x2 * (1 - curvature);
-            var cpy2 = y2;
+
+            if (orient === 'vertical') {
+                var cpx1 = x1;
 
 Review comment:
   其实可以用全名命名 cpx1 -> curvature_top_left_point_x, cpy1 -> curvature_top_right_point_y
   
   ugly.js 和 minifiy.js 会把这些长的变量名会最后变短,所以以上变量名都是给大家看的,因此不如给大家个方便,好读懂,好维护。 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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