Skip to content

Commit

Permalink
fix: clipingWithData 增加label是否被destroy的判断
Browse files Browse the repository at this point in the history
  • Loading branch information
paleface001 committed Dec 30, 2019
1 parent d8097dc commit 82a3d87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plots/line/animation/clipIn-with-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function clipingWithData(shape, animateCfg) {
shape.attr('clip', clip);
shape.setSilent('animating', true);
const label = getLineLabel(animateCfg.plot.view, shapeData[0]._origin[animateCfg.seriesField]);
if (label) {
if (label && !label.get('destroyed')) {
label.set('visible', false);
}
const parent = shape.get('parent');
Expand Down Expand Up @@ -58,7 +58,7 @@ function clipingWithData(shape, animateCfg) {
300,
() => {
marker.remove();
if (label) {
if (label && !label.get('destroyed')) {
label.set('visible', true);
animateCfg.plot.canvas.draw();
}
Expand Down

0 comments on commit 82a3d87

Please sign in to comment.