1
0
mirror of https://github.com/webslides/WebSlides.git synced 2025-08-21 04:12:01 +02:00

Fixing issue with normal transition

This commit is contained in:
Antonio Laguna
2017-01-29 11:06:04 +01:00
parent 2a46012a58
commit 8e47ffead4

View File

@@ -144,7 +144,8 @@ export default class WebSlides {
} }
const nextSlide = this.slides[slideI]; const nextSlide = this.slides[slideI];
if (this.currentSlide_ !== null && !this.isVertical) { if (this.currentSlide_ !== null && this.isVertical &&
(!this.plugins.Touch || !this.plugins.Touch.isEnabled)) {
this.scrollTransitionToSlide_( this.scrollTransitionToSlide_(
isMovingForward, nextSlide, this.onSlideChange_); isMovingForward, nextSlide, this.onSlideChange_);
} else { } else {
@@ -199,16 +200,19 @@ export default class WebSlides {
transitionToSlide_(isMovingForward, nextSlide, callback) { transitionToSlide_(isMovingForward, nextSlide, callback) {
ScrollHelper.scrollTo(0, 0); ScrollHelper.scrollTo(0, 0);
nextSlide.show(); if (!isMovingForward) {
nextSlide.moveBeforeFirst();
}
if (this.currentSlide_) { if (this.currentSlide_) {
if (isMovingForward) { if (isMovingForward) {
this.currentSlide_.moveAfterLast(); this.currentSlide_.moveAfterLast();
} else {
nextSlide.moveBeforeFirst();
}
} }
this.currentSlide_.hide();
}
nextSlide.show();
callback.call(this, nextSlide); callback.call(this, nextSlide);
} }