提交 a2645c1b 编写于 作者: P pissang

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

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