Skip to content

Commit

Permalink
fix: error condit
Browse files Browse the repository at this point in the history
  • Loading branch information
nonzzz committed Nov 26, 2024
1 parent 1dbc91a commit 4804c5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/primitives/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,9 @@ function refreshBackgroundLayer(c: SelfEventContenxt): boolean | void {
const { canvas, ctx, options: { width: ow, height: oh } } = render
const { layoutWidth: sw, layoutHeight: sh, scaleRatio: ss } = self

const capture = sw * ss >= ow || sh * ss >= oh
const capture = sw * ss >= ow && sh * ss >= oh
backgroundLayer.__refresh__ = false
if (!capture) {
if (!capture && !self.forceDestroy) {
resetLayout(treemap, sw * ss, sh * ss)
render.clear(ow, oh)
const { dpr } = backgroundLayer.cleanCacheSnapshot()
Expand Down

0 comments on commit 4804c5d

Please sign in to comment.