Skip to content

Commit

Permalink
fix: 修复tag位置为NaN时的绘制问题
Browse files Browse the repository at this point in the history
  • Loading branch information
zengyue committed Mar 4, 2020
1 parent a7f3789 commit 3aee644
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/component/guide/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ class Tag extends GuideBase {
if (!position) {
return;
}
// 数据不在显示范围内时,x/y 会为NaN
if (isNaN(position.x) || isNaN(position.y)) {
return;
}
const { content, background, textStyle } = this;
const shapes = [];

Expand Down

0 comments on commit 3aee644

Please sign in to comment.