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 2020/11/08 06:24:21 UTC

[incubator-echarts] 01/01: fix: fix symbolRotation not work.

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

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

commit a13d9ff88534b867006a2931d7677a0df3099d35
Author: 100pah <su...@gmail.com>
AuthorDate: Sun Nov 8 14:23:54 2020 +0800

    fix: fix symbolRotation not work.
---
 src/chart/helper/Line.ts | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/src/chart/helper/Line.ts b/src/chart/helper/Line.ts
index a26d1ee..92a08f0 100644
--- a/src/chart/helper/Line.ts
+++ b/src/chart/helper/Line.ts
@@ -359,24 +359,13 @@ class Line extends graphic.Group {
 
         if (symbolFrom) {
             symbolFrom.setPosition(fromPos);
-
             setSymbolRotation(symbolFrom, 0);
-
-            const tangent = line.tangentAt(0);
-            symbolFrom.rotation = Math.PI / 2 - Math.atan2(
-                tangent[1], tangent[0]
-            );
             symbolFrom.scaleX = symbolFrom.scaleY = invScale * percent;
             symbolFrom.markRedraw();
         }
         if (symbolTo) {
             symbolTo.setPosition(toPos);
-            const tangent = line.tangentAt(1);
             setSymbolRotation(symbolTo, 1);
-
-            symbolTo.rotation = -Math.PI / 2 - Math.atan2(
-                tangent[1], tangent[0]
-            );
             symbolTo.scaleX = symbolTo.scaleY = invScale * percent;
             symbolTo.markRedraw();
         }


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