diff options
| author | Matias Niemelä | 2013-07-23 23:02:15 -0400 | 
|---|---|---|
| committer | Misko Hevery | 2013-07-26 23:49:54 -0700 | 
| commit | 8ed0d5b6aa2e29ebc8d2026cb04380ed3343baef (patch) | |
| tree | 2c14004d495badc36f6336a322160e9ec2c3cf5b /src/ngAnimate | |
| parent | 81923f1e41560327f7de6e8fddfda0d2612658f3 (diff) | |
| download | angular.js-8ed0d5b6aa2e29ebc8d2026cb04380ed3343baef.tar.bz2 | |
chore($animate): replace show/hide with addClass/removeClass
Diffstat (limited to 'src/ngAnimate')
| -rw-r--r-- | src/ngAnimate/animate.js | 62 | 
1 files changed, 1 insertions, 61 deletions
diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js index ab7a19b0..93ff9d8c 100644 --- a/src/ngAnimate/animate.js +++ b/src/ngAnimate/animate.js @@ -30,8 +30,8 @@   * | {@link ng.directive:ngInclude#animations ngInclude}       | enter and leave                                    |   * | {@link ng.directive:ngSwitch#animations ngSwitch}         | enter and leave                                    |   * | {@link ng.directive:ngIf#animations ngIf}                 | enter and leave                                    | - * | {@link ng.directive:ngShow#animations ngShow & ngHide}    | show and hide                                      |   * | {@link ng.directive:ngShow#animations ngClass}            | add and remove                                     | + * | {@link ng.directive:ngShow#animations ngShow & ngHide}    | add and remove (the ng-hide class value)           |   *   * You can find out more information about animations upon visiting each directive page.   * @@ -337,60 +337,6 @@ angular.module('ngAnimate', ['ng'])          /**           * @ngdoc function -         * @name ngAnimate.$animate#show -         * @methodOf ngAnimate.$animate -         * @function -         * -         * @description -         * Reveals the element by removing the `ng-hide` class thus performing an animation in the process. During -         * this animation the CSS classes present on the element will be: -         * -         * <pre> -         * .ng-hide //already on the element if hidden -         * .ng-hide-remove -         * .ng-hide-remove-active -         * </pre> -         * -         * Once the animation is complete then all three CSS classes will be removed from the element. -         * The done callback, if provided, will be also fired once the animation is complete. -         * -         * @param {jQuery/jqLite element} element the element that will be rendered visible or hidden -         * @param {function()=} done callback function that will be called once the animation is complete -        */ -        show : function(element, done) { -          performAnimation('show', 'ng-hide-remove', element, null, null, function() { -            $delegate.show(element, done); -          }); -        }, - -        /** -         * @ngdoc function -         * @name ngAnimate.$animate#hide -         * @methodOf ngAnimate.$animate -         * -         * @description -         * Sets the element to hidden by adding the `ng-hide` class it. However, before the class is applied -         * the following CSS classes will be added temporarily to trigger any animation code: -         * -         * <pre> -         * .ng-hide-add -         * .ng-hide-add-active -         * </pre> -         * -         * Once the animation is complete then both CSS classes will be removed and `ng-hide` will be added to the element. -         * The done callback, if provided, will be also fired once the animation is complete. -         * -         * @param {jQuery/jqLite element} element the element that will be rendered visible or hidden -         * @param {function()=} done callback function that will be called once the animation is complete -        */ -        hide : function(element, done) { -          performAnimation('hide', 'ng-hide-add', element, null, null, function() { -            $delegate.hide(element, done); -          }); -        }, - -        /** -         * @ngdoc function           * @name ngAnimate.$animate#addClass           * @methodOf ngAnimate.$animate           * @@ -617,12 +563,6 @@ angular.module('ngAnimate', ['ng'])        move : function(element, done) {          return animate(element, 'ng-move', done);        }, -      show : function(element, done) { -        return animate(element, 'ng-hide-remove', done); -      }, -      hide : function(element, done) { -        return animate(element, 'ng-hide-add', done); -      },        addClass : function(element, className, done) {          return animate(element, className, done);        },  | 
