src/aria/templates/Section.js
function (domElt, refreshArgs) {
                // lazy processing of animation in/out string
                var animation = this._getAnimation();
                this._animating = true;
                var newSection = this._domElt.cloneNode(false);
                domElt.id = null;
                newSection.className += " not-visible";
                newSection = ariaUtilsDom.replaceHTML(newSection, this.html);
                var from = domElt;
                var to = newSection;
                ariaUtilsDom.insertAdjacentElement(from, "afterEnd", newSection);
                this.setDom(newSection);

                var animSemaphore = false;
                var cfg = {
                    // from : from,
                    to : to,
                    type : 3,
                    reverse : animation.animIn.reverse,
                    hiddenClass : 'not-visible'
                };

                var cfg2 = {
                    from : from,
                    // to : to,
                    type : 3,
                    reverse : animation.animOut.reverse,
                    hiddenClass : 'not-visible'
                };

                var anim = new ariaUtilsCssAnimations();
                var anim2 = new ariaUtilsCssAnimations();

                var animEnd = {
                    "animationend" : function () {
                        if (animSemaphore) {
                            ariaUtilsDom.removeElement(from);
                            this._animating = false;
                            this.tplCtxt.onRefreshAnimationEnd(refreshArgs);
                        } else {
                            animSemaphore = true;
                        }
                    },
                    scope : this
                };

                anim.$on(animEnd);
                anim2.$on(animEnd);

                anim.start(animation.animIn.type, cfg);
                anim2.start(animation.animOut.type, cfg2);

            }
function (domElt, refreshArgs) {
                // lazy processing of animation in/out string
                var animation = this._getAnimation();
                this._animating = true;
                var newSection = this._domElt.cloneNode(false);
                domElt.id = null;
                newSection.className += " not-visible";
                newSection = ariaUtilsDom.replaceHTML(newSection, this.html);
                var from = domElt;
                var to = newSection;
                ariaUtilsDom.insertAdjacentElement(from, "afterEnd", newSection);
                this.setDom(newSection);

                var animSemaphore = false;
                var cfg = {
                    // from : from,
                    to : to,
                    type : 3,
                    reverse : animation.animIn.reverse,
                    hiddenClass : 'not-visible'
                };

                var cfg2 = {
                    from : from,
                    // to : to,
                    type : 3,
                    reverse : animation.animOut.reverse,
                    hiddenClass : 'not-visible'
                };

                var anim = new ariaUtilsCssAnimations();
                var anim2 = new ariaUtilsCssAnimations();

                var animEnd = {
                    "animationend" : function () {
                        if (animSemaphore) {
                            ariaUtilsDom.removeElement(from);
                            this._animating = false;
                            this.tplCtxt.onRefreshAnimationEnd(refreshArgs);
                        } else {
                            animSemaphore = true;
                        }
                    },
                    scope : this
                };

                anim.$on(animEnd);
                anim2.$on(animEnd);

                anim.start(animation.animIn.type, cfg);
                anim2.start(animation.animOut.type, cfg2);

            }
function ( domElt , refreshArgs ) { // lazy processing of animation in/out string var animation = this . _getAnimation ( ) ; this . _animating = true ; var newSection = this . _domElt . cloneNode ( false ) ; domElt . id = null ; newSection . className += " not-visible" ; newSection = ariaUtilsDom . replaceHTML ( newSection , this . html ) ; var from = domElt ; var to = newSection ; ariaUtilsDom . insertAdjacentElement ( from , "afterEnd" , newSection ) ; this . setDom ( newSection ) ; var animSemaphore = false ; var cfg = { // from : from, to : to , type : 3 , reverse : animation . animIn . reverse , hiddenClass : 'not-visible' } ; var cfg2 = { from : from , // to : to, type : 3 , reverse : animation . animOut . reverse , hiddenClass : 'not-visible' } ; var anim = new ariaUtilsCssAnimations ( ) ; var anim2 = new ariaUtilsCssAnimations ( ) ; var animEnd = { "animationend" : function ( ) { if ( animSemaphore ) { ariaUtilsDom . removeElement ( from ) ; this . _animating = false ; this . tplCtxt . onRefreshAnimationEnd ( refreshArgs ) ; } else { animSemaphore = true ; } } , scope : this } ; anim . $on ( animEnd ) ; anim2 . $on ( animEnd ) ; anim . start ( animation . animIn . type , cfg ) ; anim2 . start ( animation . animOut . type , cfg2 ) ; }
Prepares and performs the transition animation from a section to another one.
@param {HTMLElement} domElt element to be animated
@param {Object} refreshArgs parameter provided to the template onRefreshAnimationEnd handler
Prepares and performs the transition animation from a section to another one .