diff options
| author | Matias Niemelàˆ | 2013-05-07 17:11:39 -0400 |
|---|---|---|
| committer | Misko Hevery | 2013-05-08 16:03:31 -0700 |
| commit | 11f712bc3e310302eb2e8691cf6d110bdcde1810 (patch) | |
| tree | 5e8b27a3dc2a8b0b18a4e0560f21f007206772b5 /src/ng/animator.js | |
| parent | 14757874a7cea7961f31211b245c417bd4b20512 (diff) | |
| download | angular.js-11f712bc3e310302eb2e8691cf6d110bdcde1810.tar.bz2 | |
chore(ngAnimate): CSS classes X-setup/X-start -> X/X-active
BREAKING CHANGE: css classes foo-setup/foo-start become foo/foo-active
The CSS transition classes have changed suffixes. To migrate rename
.foo-setup {...} to .foo {...}
.foo-start {...} to .foo-active {...}
or for type: enter, leave, move, show, hide
.foo-type-setup {...} to .foo-type {...}
.foo-type-start {...} to .foo-type-active {...}
Diffstat (limited to 'src/ng/animator.js')
| -rw-r--r-- | src/ng/animator.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/ng/animator.js b/src/ng/animator.js index 97c9e0ed..04ef4a6e 100644 --- a/src/ng/animator.js +++ b/src/ng/animator.js @@ -58,7 +58,7 @@ * The animate-enter CSS class is the event name that you * have provided within the ngAnimate attribute. * */ - * .animate-enter-setup { + * .animate-enter { * -webkit-transition: 1s linear all; /* Safari/Chrome */ * -moz-transition: 1s linear all; /* Firefox */ * -ms-transition: 1s linear all; /* IE10 */ @@ -74,7 +74,7 @@ * classes together to avoid any CSS-specificity * conflicts * */ - * .animate-enter-setup.animate-enter-start { + * .animate-enter.animate-enter-active { * /* The animation code itself */ * opacity: 1; * } @@ -87,7 +87,7 @@ * * <pre> * <style type="text/css"> - * .animate-enter-setup { + * .animate-enter { * -webkit-animation: enter_sequence 1s linear; * -moz-animation: enter_sequence 1s linear; * -o-animation: enter_sequence 1s linear; @@ -116,8 +116,8 @@ * * ngAnimate will first examine any CSS animation code and then fallback to using CSS transitions. * - * Upon DOM mutation, the setup class is added first, then the browser is allowed to reflow the content and then, - * the start class is added to trigger the animation. The ngAnimate directive will automatically extract the duration + * Upon DOM mutation, the event class is added first, then the browser is allowed to reflow the content and then, + * the active class is added to trigger the animation. The ngAnimate directive will automatically extract the duration * of the animation to determine when the animation ends. Once the animation is over then both CSS classes will be * removed from the DOM. If a browser does not support CSS transitions or CSS animations then the animation will start and end * immediately resulting in a DOM element that is at it's final state. This final state is when the DOM element @@ -270,8 +270,7 @@ var $AnimatorProvider = function() { beforeFn(element, parent, after); afterFn(element, parent, after); } else { - var setupClass = className + '-setup'; - var startClass = className + '-start'; + var activeClassName = className + '-active'; if (!parent) { parent = after ? after.parent() : element.parent(); @@ -284,7 +283,7 @@ var $AnimatorProvider = function() { } element.data(NG_ANIMATE_CONTROLLER, {running:true}); - element.addClass(setupClass); + element.addClass(className); beforeFn(element, parent, after); if (element.length == 0) return done(); @@ -304,7 +303,7 @@ var $AnimatorProvider = function() { }; function beginAnimation() { - element.addClass(startClass); + element.addClass(activeClassName); if (polyfillStart) { polyfillStart(element, done, memento); } else if (isFunction($window.getComputedStyle)) { @@ -357,8 +356,8 @@ var $AnimatorProvider = function() { function done() { afterFn(element, parent, after); - element.removeClass(setupClass); - element.removeClass(startClass); + element.removeClass(className); + element.removeClass(activeClassName); element.removeData(NG_ANIMATE_CONTROLLER); } } |
