提交 a2645c1b 编写于 作者: P pissang

fix(state): forget to remove saved states in clearStates.

上级 3f46e8a0
...@@ -1836,6 +1836,12 @@ class ECharts extends Eventful { ...@@ -1836,6 +1836,12 @@ class ECharts extends Eventful {
// TODO If el is incremental. // TODO If el is incremental.
if (el.hasState()) { if (el.hasState()) {
(el as DisplayableWithStatesHistory).__prevStates = el.currentStates; (el as DisplayableWithStatesHistory).__prevStates = el.currentStates;
el.clearStates();
}
else if ((el as DisplayableWithStatesHistory).__prevStates) {
(el as DisplayableWithStatesHistory).__prevStates = null;
}
const textContent = el.getTextContent(); const textContent = el.getTextContent();
const textGuide = el.getTextGuideLine(); const textGuide = el.getTextGuideLine();
if (el.stateTransition) { if (el.stateTransition) {
...@@ -1847,8 +1853,6 @@ class ECharts extends Eventful { ...@@ -1847,8 +1853,6 @@ class ECharts extends Eventful {
if (textGuide && textGuide.stateTransition) { if (textGuide && textGuide.stateTransition) {
textGuide.stateTransition = null; textGuide.stateTransition = null;
} }
el.clearStates();
}
}); });
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册