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

wangzx pushed a commit to branch fix/effect-line/roundTrip
in repository https://gitbox.apache.org/repos/asf/echarts.git

commit 1fae7eea07d7e49b9a6996448c055ad588daa700
Author: plainheart <y...@all-my-life.cn>
AuthorDate: Tue Aug 12 02:22:40 2025 +0800

    fix(effectLine): fix symbol flicker at the ends when `roundTrip` is not 
enabled (resolves #20216)
---
 src/chart/helper/EffectLine.ts     | 6 +++---
 src/chart/helper/EffectPolyline.ts | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/chart/helper/EffectLine.ts b/src/chart/helper/EffectLine.ts
index f368d83ac..195783ed7 100644
--- a/src/chart/helper/EffectLine.ts
+++ b/src/chart/helper/EffectLine.ts
@@ -207,7 +207,7 @@ class EffectLine extends graphic.Group {
         const p1 = symbol.__p1;
         const p2 = symbol.__p2;
         const cp1 = symbol.__cp1;
-        const t = symbol.__t < 1 ? symbol.__t : 2 - symbol.__t;
+        const t = symbol.__t <= 1 ? symbol.__t : 2 - symbol.__t;
         const pos = [symbol.x, symbol.y];
         const lastPos = pos.slice();
         const quadraticAt = curveUtil.quadraticAt;
@@ -216,9 +216,9 @@ class EffectLine extends graphic.Group {
         pos[1] = quadraticAt(p1[1], cp1[1], p2[1], t);
 
         // Tangent
-        const tx = symbol.__t < 1 ? quadraticDerivativeAt(p1[0], cp1[0], 
p2[0], t)
+        const tx = symbol.__t <= 1 ? quadraticDerivativeAt(p1[0], cp1[0], 
p2[0], t)
                  : quadraticDerivativeAt(p2[0], cp1[0], p1[0], 1 - t);
-         const ty = symbol.__t < 1 ? quadraticDerivativeAt(p1[1], cp1[1], 
p2[1], t)
+        const ty = symbol.__t <= 1 ? quadraticDerivativeAt(p1[1], cp1[1], 
p2[1], t)
                  : quadraticDerivativeAt(p2[1], cp1[1], p1[1], 1 - t);
 
 
diff --git a/src/chart/helper/EffectPolyline.ts 
b/src/chart/helper/EffectPolyline.ts
index 389dbe4d8..282df0725 100644
--- a/src/chart/helper/EffectPolyline.ts
+++ b/src/chart/helper/EffectPolyline.ts
@@ -67,7 +67,7 @@ class EffectPolyline extends EffectLine {
 
     // Override
     protected _updateSymbolPosition(symbol: ECSymbolOnEffectLine) {
-        const t = symbol.__t < 1 ? symbol.__t : 2 - symbol.__t;
+        const t = symbol.__t <= 1 ? symbol.__t : 2 - symbol.__t;
         const points = this._points;
         const offsets = this._offsets;
         const len = points.length;
@@ -107,8 +107,8 @@ class EffectPolyline extends EffectLine {
         symbol.x = p0[0] * (1 - p) + p * p1[0];
         symbol.y = p0[1] * (1 - p) + p * p1[1];
 
-        const tx = symbol.__t < 1 ? p1[0] - p0[0] : p0[0] - p1[0];
-        const ty = symbol.__t < 1 ? p1[1] - p0[1] : p0[1] - p1[1];
+        const tx = symbol.__t <= 1 ? p1[0] - p0[0] : p0[0] - p1[0];
+        const ty = symbol.__t <= 1 ? p1[1] - p0[1] : p0[1] - p1[1];
         symbol.rotation = -Math.atan2(ty, tx) - Math.PI / 2;
 
         this._lastFrame = frame;


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

Reply via email to