Skip to content

Commit

Permalink
fix: gui icon 加载完成后,增加检测步骤,避免无意义的渲染 warning (#1997)
Browse files Browse the repository at this point in the history
  • Loading branch information
wjgogogo authored Dec 16, 2022
1 parent c1981f4 commit 6f13aa4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/s2-core/src/common/icons/gui-icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ export class GuiIcon extends Group {
} else {
this.getImage(name, cacheKey, fill)
.then((value: HTMLImageElement) => {
// 加载完成后,当前 Cell 可能已经销毁了
if (this.destroyed) {
return;
}
image.attr('img', value);
this.addShape('image', image);
})
Expand Down

1 comment on commit 6f13aa4

@vercel
Copy link

@vercel vercel bot commented on 6f13aa4 Dec 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

antvis-s2 – ./

antvis-s2.vercel.app
antvis-s2-git-master-antv-s2.vercel.app
antvis-s2-antv-s2.vercel.app

Please sign in to comment.