Skip to content

Commit

Permalink
Core - Edit comments
Browse files Browse the repository at this point in the history
  • Loading branch information
smastrom committed Apr 15, 2024
1 parent 674f782 commit 636482f
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions packages/notivue/core/createStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,17 @@ export function createAnimations(
})
},
updatePositions({ isImmediate = false } = {}) {
this.transitionStyles === null
? window.requestAnimationFrame(() => {
this.syncTransitionStyles()
window.requestAnimationFrame(() => {
this.updatePositionsImpl(isImmediate)
})
})
: this.updatePositionsImpl(isImmediate)
if (!this.transitionStyles) {
// Runs the first time a notification is rendered
window.requestAnimationFrame(() => {
this.syncTransitionStyles()
window.requestAnimationFrame(() => {
this.updatePositionsImpl(isImmediate)
})
})
} else {
this.updatePositionsImpl(isImmediate)
}
},
updatePositionsImpl(isImmediate: boolean) {
console.log('Updating positions')
Expand Down

0 comments on commit 636482f

Please sign in to comment.