Skip to content

Commit

Permalink
Merge pull request #557 from antvis/fix-repaint-remove-halo
Browse files Browse the repository at this point in the history
fix guide.repaint will remove halo
  • Loading branch information
leungwensen authored Apr 18, 2019
2 parents 9943e70 + 8febbba commit 99b12fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/interaction/pie-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ class PieSelect extends Interaction {
}
const { x, y } = Util.createEvent(ev, chart);

this.halo && this.halo.remove(true);

const records = chart.getSnapRecords({ x, y });
if (!records.length) {
this.selected = false;
Expand All @@ -128,6 +126,7 @@ class PieSelect extends Interaction {
this.lastShape = null;
this.selected = false;
} else {
this.halo && this.halo.remove(true);
this._selectedShape(selectedShape);
}

Expand Down
2 changes: 1 addition & 1 deletion test/unit/interaction/pie-select-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ describe('Pie-Select', function() {
expect(interaction.selectedShape).not.to.be.null;
expect(interaction.selectedShape.get('origin')._origin).to.eql({ name: '机器之血', percent: 0.18, a: '1' });
expect(interaction.halo).not.to.be.undefined;
expect(interaction.halo.get('destroyed')).to.be.true;
expect(interaction.halo.get('destroyed')).to.be.false;
chart.destroy();
done();
}, 300);
Expand Down

0 comments on commit 99b12fc

Please sign in to comment.