提交 3bd829d6 编写于 作者: P pissang

fix(line): fix symbol may disappear if switched too frequently

上级 f543734d
......@@ -192,6 +192,11 @@ class Symbol extends graphic.Group {
}
}
if (disableAnimation) {
// Must stop remove animation manually if don't call initProps or updateProps.
this.childAt(0).stopAnimation('remove');
}
this._seriesModel = seriesModel;
}
......
......@@ -1011,9 +1011,10 @@ class LineView extends ChartView {
const symbolPath = el.getSymbolPath();
const text = symbolPath.getTextContent();
symbolPath.animateFrom({
scaleX: 0,
scaleY: 0
el.attr({ scaleX: 0, scaleY: 0});
el.animateFrom({
scaleX: 1,
scaleY: 1
}, {
duration: 200,
delay: delay
......
......@@ -331,6 +331,11 @@ function animateOrSetProps<Props>(
}
const animationEnabled = animatableModel && animatableModel.isAnimationEnabled();
if (!isRemove) {
// Must stop the remove animation.
el.stopAnimation('remove');
}
if (animationEnabled) {
let duration: number | Function;
let animationEasing: AnimationEasing;
......@@ -368,11 +373,6 @@ function animateOrSetProps<Props>(
}
}
if (!isRemove) {
// Must stop the remove animation.
el.stopAnimation('remove');
}
duration > 0
? (
isFrom
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册