#31 : Fix swipe

This commit is contained in:
Vadim
2021-07-02 17:26:37 +03:00
parent 3f9f6c1147
commit ecca0c3892

View File

@@ -17,7 +17,7 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const directionFnDescription = { const autoplayDirectionFnDescription = {
[NEXT]: () => { [NEXT]: () => {
progressManager.start(() => { progressManager.start(() => {
showNextPage() showNextPage()
@@ -30,6 +30,15 @@
} }
} }
const directionFnDescription = {
[NEXT]: () => {
showNextPage()
},
[PREV]: () => {
showPrevPage()
}
}
/** /**
* CSS animation timing function * CSS animation timing function
* examples: 'linear', 'steps(5, end)', 'cubic-bezier(0.1, -0.6, 0.2, 0)' * examples: 'linear', 'steps(5, end)', 'cubic-bezier(0.1, -0.6, 0.2, 0)'
@@ -161,7 +170,7 @@
function applyAutoplay() { function applyAutoplay() {
if (autoplay) { if (autoplay) {
directionFnDescription[autoplayDirection]() autoplayDirectionFnDescription[autoplayDirection]()
} }
} }