diff --git a/js/controllers/autoanimate.js b/js/controllers/autoanimate.js index 5da88fa284..6a706e3c4c 100644 --- a/js/controllers/autoanimate.js +++ b/js/controllers/autoanimate.js @@ -178,28 +178,12 @@ export default class AutoAnimate { let fromProps = this.getAutoAnimatableProperties( 'from', from, elementOptions ), toProps = this.getAutoAnimatableProperties( 'to', to, elementOptions ); - // Maintain fragment visibility for matching elements when - // we're navigating forwards, this way the viewer won't need - // to step through the same fragments twice if( to.classList.contains( 'fragment' ) ) { // Don't auto-animate the opacity of fragments to avoid // conflicts with fragment animations delete toProps.styles['opacity']; - if( from.classList.contains( 'fragment' ) ) { - - let fromFragmentStyle = ( from.className.match( FRAGMENT_STYLE_REGEX ) || [''] )[0]; - let toFragmentStyle = ( to.className.match( FRAGMENT_STYLE_REGEX ) || [''] )[0]; - - // Only skip the fragment if the fragment animation style - // remains unchanged - if( fromFragmentStyle === toFragmentStyle && animationOptions.slideDirection === 'forward' ) { - to.classList.add( 'visible', 'disabled' ); - } - - } - } // If translation and/or scaling are enabled, css transform @@ -471,7 +455,7 @@ export default class AutoAnimate { // Text this.findAutoAnimateMatches( pairs, fromSlide, toSlide, textNodes, node => { - return node.nodeName + ':::' + node.innerText; + return node.nodeName + ':::' + node.textContent.trim(); } ); // Media @@ -481,7 +465,7 @@ export default class AutoAnimate { // Code this.findAutoAnimateMatches( pairs, fromSlide, toSlide, codeNodes, node => { - return node.nodeName + ':::' + node.innerText; + return node.nodeName + ':::' + node.textContent.trim(); } ); pairs.forEach( pair => {