|
@@ -1212,15 +1212,11 @@ export default function( revealElement, options ) {
|
|
indexh = updateSlides( HORIZONTAL_SLIDES_SELECTOR, h === undefined ? indexh : h );
|
|
indexh = updateSlides( HORIZONTAL_SLIDES_SELECTOR, h === undefined ? indexh : h );
|
|
indexv = updateSlides( VERTICAL_SLIDES_SELECTOR, v === undefined ? indexv : v );
|
|
indexv = updateSlides( VERTICAL_SLIDES_SELECTOR, v === undefined ? indexv : v );
|
|
|
|
|
|
-
|
|
+
|
|
- updateSlidesVisibility();
|
|
+ let slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore );
|
|
-
|
|
|
|
- layout();
|
|
|
|
|
|
|
|
-
|
|
+
|
|
- if( overview.isActive() ) {
|
|
+ if( !slideChanged ) previousSlide = null;
|
|
- overview.update();
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1230,18 +1226,37 @@ export default function( revealElement, options ) {
|
|
|
|
|
|
currentSlide = currentVerticalSlides[ indexv ] || currentHorizontalSlide;
|
|
currentSlide = currentVerticalSlides[ indexv ] || currentHorizontalSlide;
|
|
|
|
|
|
|
|
+ let autoAnimateTransition = false;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if( slideChanged && previousSlide && currentSlide && !overview.isActive() ) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if( previousSlide.hasAttribute( 'data-auto-animate' ) && currentSlide.hasAttribute( 'data-auto-animate' ) ) {
|
|
|
|
+ autoAnimateTransition = true;
|
|
|
|
+ dom.slides.classList.add( 'disable-slide-transitions' );
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ updateSlidesVisibility();
|
|
|
|
+
|
|
|
|
+ layout();
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if( overview.isActive() ) {
|
|
|
|
+ overview.update();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
if( typeof f !== 'undefined' ) {
|
|
if( typeof f !== 'undefined' ) {
|
|
fragments.goto( f );
|
|
fragments.goto( f );
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- let slideChanged = ( indexh !== indexhBefore || indexv !== indexvBefore );
|
|
|
|
- if (!slideChanged) {
|
|
|
|
-
|
|
|
|
- previousSlide = null;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1318,21 +1333,15 @@ export default function( revealElement, options ) {
|
|
cueAutoSlide();
|
|
cueAutoSlide();
|
|
|
|
|
|
|
|
|
|
- if( slideChanged && previousSlide && currentSlide && !overview.isActive() ) {
|
|
+ if( autoAnimateTransition ) {
|
|
|
|
|
|
-
|
|
+ setTimeout( () => {
|
|
-
|
|
+ dom.slides.classList.remove( 'disable-slide-transitions' );
|
|
- if( previousSlide.hasAttribute( 'data-auto-animate' ) && currentSlide.hasAttribute( 'data-auto-animate' ) ) {
|
|
+ }, 0 );
|
|
- dom.slides.classList.add( 'disable-slide-transitions' );
|
|
|
|
|
|
|
|
- setTimeout( () => {
|
|
+ if( config.autoAnimate ) {
|
|
- dom.slides.classList.remove( 'disable-slide-transitions' );
|
|
+
|
|
- }, 0 );
|
|
+ autoAnimate.run( previousSlide, currentSlide );
|
|
-
|
|
|
|
- if( config.autoAnimate ) {
|
|
|
|
-
|
|
|
|
- autoAnimate.run( previousSlide, currentSlide );
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|