From 6ab65d4b8ad6564ab5396fb4b84c73e04e0618ba Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Fri, 6 Mar 2020 10:36:39 +0100 Subject: [PATCH] remove legacy feature detection for 1 && config.autoSlide && config.autoSlideStoppable && features.canvas && features.requestAnimationFrame ) { + if( numberOfSlides > 1 && config.autoSlide && config.autoSlideStoppable ) { autoSlidePlayer = new Playback( dom.wrapper, function() { return Math.min( Math.max( ( Date.now() - autoSlideStartTime ) / autoSlide, 0 ), 1 ); } ); @@ -2009,50 +1988,6 @@ } - /** - * Wrap all links in 3D goodness. - */ - function enableRollingLinks() { - - if( features.transforms3d && !( 'msPerspective' in document.body.style ) ) { - var anchors = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' a' ); - - for( var i = 0, len = anchors.length; i < len; i++ ) { - var anchor = anchors[i]; - - if( anchor.textContent && !anchor.querySelector( '*' ) && ( !anchor.className || !anchor.classList.contains( anchor, 'roll' ) ) ) { - var span = document.createElement('span'); - span.setAttribute('data-title', anchor.text); - span.innerHTML = anchor.innerHTML; - - anchor.classList.add( 'roll' ); - anchor.innerHTML = ''; - anchor.appendChild(span); - } - } - } - - } - - /** - * Unwrap all 3D links. - */ - function disableRollingLinks() { - - var anchors = dom.wrapper.querySelectorAll( SLIDES_SELECTOR + ' a.roll' ); - - for( var i = 0, len = anchors.length; i < len; i++ ) { - var anchor = anchors[i]; - var span = anchor.querySelector( 'span' ); - - if( span ) { - anchor.classList.remove( 'roll' ); - anchor.innerHTML = span.innerHTML; - } - } - - } - /** * Bind preview frame links. * @@ -2459,13 +2394,6 @@ overview = true; dom.wrapper.classList.add( 'overview' ); - dom.wrapper.classList.remove( 'overview-deactivating' ); - - if( features.overviewTransitions ) { - setTimeout( function() { - dom.wrapper.classList.add( 'overview-animated' ); - }, 1 ); - } // Don't auto-slide while in overview mode cancelAutoSlide(); @@ -2574,7 +2502,6 @@ overview = false; dom.wrapper.classList.remove( 'overview' ); - dom.wrapper.classList.remove( 'overview-animated' ); // Temporarily add a class so that transitions can do different things // depending on whether they are exiting/entering overview, or just @@ -5974,7 +5901,7 @@ event.preventDefault && event.preventDefault(); } // ESC or O key - else if ( ( keyCode === 27 || keyCode === 79 ) && features.transforms3d ) { + else if( keyCode === 27 || keyCode === 79 ) { if( dom.overlay ) { closeOverlay(); }