Skip to content

Commit

Permalink
fix keep the requestAnimationFrame() to avoid lag UI
Browse files Browse the repository at this point in the history
  • Loading branch information
muktihari committed Nov 29, 2023
1 parent 7d49a7d commit fe4fada
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/OpenActivity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,10 @@ export default {
console.debug('Total elapsed:\t\t', elapsed, 'ms')
console.groupEnd()
this.preprocessing(result)
this.scrollTop()
requestAnimationFrame(() => {
this.preprocessing(result)
this.scrollTop()
})
},
encodeHandler(result: EncodeResult, elapsed: number) {
result = new EncodeResult(result)
Expand Down

0 comments on commit fe4fada

Please sign in to comment.