Skip to content

Commit

Permalink
chore(grid): improve grid responsive effects
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed Oct 21, 2021
1 parent c4cc24f commit bbb1a5a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/grid/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,8 @@ export class Grid<Container extends HTMLElement> {
this.height = rect.height
}
})
const mutationObserver = new MutationObserver(() => {
requestAnimationFrame(digestChild)
})
const resizeObserver = new ResizeObserver(() => {
requestAnimationFrame(digestSize)
})
const mutationObserver = new MutationObserver(digestChild)
const resizeObserver = new ResizeObserver(digestSize)
resizeObserver.observe(this.container)
mutationObserver.observe(this.container, {
attributeFilter: ['style'],
Expand Down

0 comments on commit bbb1a5a

Please sign in to comment.