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

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


The following commit(s) were added to refs/heads/optimize-clone-divide by this 
push:
     new f499d42  fix(transition): fix opacity wrong when using divideShape 
clone
f499d42 is described below

commit f499d42699079ec898a7152be2d058740d09eeb1
Author: pissang <[email protected]>
AuthorDate: Mon Dec 20 16:43:31 2021 +0800

    fix(transition): fix opacity wrong when using divideShape clone
---
 src/animation/universalTransition.ts | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/animation/universalTransition.ts 
b/src/animation/universalTransition.ts
index 8678cfc..0ccae06 100644
--- a/src/animation/universalTransition.ts
+++ b/src/animation/universalTransition.ts
@@ -20,7 +20,7 @@
 // Universal transitions that can animate between any shapes(series) and any 
properties in any amounts.
 
 import SeriesModel, { SERIES_UNIVERSAL_TRANSITION_PROP } from 
'../model/Series';
-import {createHashMap, each, map, filter, isArray} from 
'zrender/src/core/util';
+import {createHashMap, each, map, filter, isArray, extend} from 
'zrender/src/core/util';
 import Element, { ElementAnimateConfig } from 'zrender/src/Element';
 import { applyMorphAnimation, getPathList } from './morphTransitionHelper';
 import Path from 'zrender/src/graphic/Path';
@@ -173,7 +173,11 @@ function transitionBetween(
     ) {
         if (rawFrom || from) {
             to.animateFrom({
-                style: (rawFrom || from).style
+                style: (rawFrom && rawFrom !== from)
+                    // dividingMethod like clone may override the 
style(opacity)
+                    // So extend it to raw style.
+                    ? extend(extend({}, rawFrom.style), from.style)
+                    : from.style
             }, animationCfg);
         }
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to