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 2020/06/09 08:28:09 UTC
[incubator-echarts] branch label-enhancement updated: fix(state):
fix wrong emphasis lift color when animation is enabled
This is an automated email from the ASF dual-hosted git repository.
shenyi pushed a commit to branch label-enhancement
in repository https://gitbox.apache.org/repos/asf/incubator-echarts.git
The following commit(s) were added to refs/heads/label-enhancement by this push:
new 3f46e8a fix(state): fix wrong emphasis lift color when animation is enabled
3f46e8a is described below
commit 3f46e8a0c51156a7ea1cf31836a5d6d388de1b0b
Author: pissang <bm...@gmail.com>
AuthorDate: Tue Jun 9 16:27:35 2020 +0800
fix(state): fix wrong emphasis lift color when animation is enabled
---
src/util/graphic.ts | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/util/graphic.ts b/src/util/graphic.ts
index fa043c1..10e1bbd 100644
--- a/src/util/graphic.ts
+++ b/src/util/graphic.ts
@@ -439,12 +439,16 @@ function elementStateProxy(this: Displayable, stateName: string): DisplayableSta
const currentFill = this.style.fill;
const currentStroke = this.style.stroke;
if (currentFill || currentStroke) {
- let fromState;
+ let fromState: {fill: ColorString, stroke: ColorString};
if (!hasEmphasis) {
fromState = {fill: currentFill, stroke: currentStroke};
for (let i = 0; i < this.animators.length; i++) {
const animator = this.animators[i];
- if (animator.targetName === 'style') {
+ if (animator.__fromStateTransition
+ // Dont consider the animation to emphasis state.
+ && animator.__fromStateTransition.indexOf('emphasis') < 0
+ && animator.targetName === 'style'
+ ) {
animator.saveFinalToTarget(fromState, ['fill', 'stroke']);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org