#31 : Rename applyAutoplay -> applyAutoplayIfNeeded
This commit is contained in:
@@ -169,7 +169,7 @@
|
|||||||
pagesElement.append(first.cloneNode(true))
|
pagesElement.append(first.cloneNode(true))
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyAutoplay(options) {
|
function applyAutoplayIfNeeded(options) {
|
||||||
// prevent progress change if not infinite for first and last page
|
// prevent progress change if not infinite for first and last page
|
||||||
if (
|
if (
|
||||||
!infinite && (
|
!infinite && (
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
applyPageSizes()
|
applyPageSizes()
|
||||||
}
|
}
|
||||||
|
|
||||||
applyAutoplay()
|
applyAutoplayIfNeeded()
|
||||||
|
|
||||||
addResizeEventListener(applyPageSizes)
|
addResizeEventListener(applyPageSizes)
|
||||||
})()
|
})()
|
||||||
@@ -269,7 +269,7 @@
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
offsetPage(animated)
|
offsetPage(animated)
|
||||||
const jumped = jumpIfNeeded()
|
const jumped = jumpIfNeeded()
|
||||||
!jumped && applyAutoplay({ delaysMs: _duration })
|
!jumped && applyAutoplayIfNeeded({ delaysMs: _duration })
|
||||||
}, offsetDelayMs)
|
}, offsetDelayMs)
|
||||||
}, { animated })
|
}, { animated })
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@
|
|||||||
store.prev({ infinite, pagesCount })
|
store.prev({ infinite, pagesCount })
|
||||||
offsetPage(animated)
|
offsetPage(animated)
|
||||||
const jumped = jumpIfNeeded()
|
const jumped = jumpIfNeeded()
|
||||||
!jumped && applyAutoplay({ delaysMs: _duration })
|
!jumped && applyAutoplayIfNeeded({ delaysMs: _duration })
|
||||||
}, { animated })
|
}, { animated })
|
||||||
}
|
}
|
||||||
function showNextPage(options) {
|
function showNextPage(options) {
|
||||||
@@ -288,7 +288,7 @@
|
|||||||
store.next({ infinite, pagesCount })
|
store.next({ infinite, pagesCount })
|
||||||
offsetPage(animated)
|
offsetPage(animated)
|
||||||
const jumped = jumpIfNeeded()
|
const jumped = jumpIfNeeded()
|
||||||
!jumped && applyAutoplay({ delaysMs: _duration })
|
!jumped && applyAutoplayIfNeeded({ delaysMs: _duration })
|
||||||
}, { animated })
|
}, { animated })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user