You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by sh...@apache.org on 2021/06/21 05:14:25 UTC

[echarts] branch enhance-morph updated: fix(animation): fix wrong type guess in label animation.

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

shenyi pushed a commit to branch enhance-morph
in repository https://gitbox.apache.org/repos/asf/echarts.git


The following commit(s) were added to refs/heads/enhance-morph by this push:
     new b32d55b  fix(animation): fix wrong type guess in label animation.
b32d55b is described below

commit b32d55bd099cf692319326c416c620685ee005ac
Author: pissang <bm...@gmail.com>
AuthorDate: Mon Jun 21 13:13:14 2021 +0800

    fix(animation): fix wrong type guess in label animation.
---
 src/label/labelStyle.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/label/labelStyle.ts b/src/label/labelStyle.ts
index 0012983..def6b19 100644
--- a/src/label/labelStyle.ts
+++ b/src/label/labelStyle.ts
@@ -674,7 +674,6 @@ export function setLabelValueAnimation(
     const obj = labelInner(label);
     obj.prevValue = obj.value;
     obj.value = value;
-
     const normalLabelModel = labelStatesModels.normal;
 
     obj.valueAnimation = normalLabelModel.get('valueAnimation');
@@ -711,6 +710,7 @@ export function animateLabelValue(
             targetValue,
             percent
         );
+
         labelInnerStore.interpolatedValue = percent === 1 ? null : interpolated;
 
         const labelText = getLabelText({
@@ -724,7 +724,7 @@ export function animateLabelValue(
         setLabelText(textEl, labelText);
     }
 
-    (currValue == null
+    (labelInnerStore.prevValue == null
         ? initProps
         : updateProps
     )(textEl, {}, animatableModel, dataIndex, null, during);

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