#31 : Reset progress on destroy

This commit is contained in:
Vadim
2021-07-03 00:25:56 +03:00
parent 6dee586639
commit 158a7489b2
2 changed files with 1 additions and 2 deletions

View File

@@ -188,6 +188,7 @@
currentPageIndex = value.currentPageIndex currentPageIndex = value.currentPageIndex
console.log('currentPageIndex', currentPageIndex) console.log('currentPageIndex', currentPageIndex)
})) }))
cleanupFns.push(() => progressManager.reset())
if (pagesElement && pageWindowElement) { if (pagesElement && pageWindowElement) {
// load first and last child to clone them // load first and last child to clone them
loaded = [0, pagesElement.children.length - 1] loaded = [0, pagesElement.children.length - 1]

View File

@@ -51,6 +51,4 @@ export class ProgressManager {
reset() { reset() {
clearInterval(this.#interval) clearInterval(this.#interval)
} }
// TODO: add on destroy
} }