@@ -4,13 +4,6 @@ var $animateMinErr = minErr('$animate');
44var ELEMENT_NODE = 1 ;
55var NG_ANIMATE_CLASSNAME = 'ng-animate' ;
66
7-
8- function assertNoCallback ( param ) {
9- if ( isFunction ( param ) ) {
10- throw $animateMinErr ( 'nocb' , 'Do not pass a callback to animate methods' ) ;
11- }
12- }
13-
147function mergeClasses ( a , b ) {
158 if ( ! a && ! b ) return '' ;
169 if ( ! a ) return b ;
@@ -423,7 +416,6 @@ var $AnimateProvider = ['$provide', function($provide) {
423416 * @return {Promise } the animation callback promise
424417 */
425418 enter : function ( element , parent , after , options ) {
426- assertNoCallback ( options ) ;
427419 parent = parent && jqLite ( parent ) ;
428420 after = after && jqLite ( after ) ;
429421 parent = parent || after . parent ( ) ;
@@ -450,7 +442,6 @@ var $AnimateProvider = ['$provide', function($provide) {
450442 * @return {Promise } the animation callback promise
451443 */
452444 move : function ( element , parent , after , options ) {
453- assertNoCallback ( options ) ;
454445 parent = parent && jqLite ( parent ) ;
455446 after = after && jqLite ( after ) ;
456447 parent = parent || after . parent ( ) ;
@@ -472,7 +463,6 @@ var $AnimateProvider = ['$provide', function($provide) {
472463 * @return {Promise } the animation callback promise
473464 */
474465 leave : function ( element , options ) {
475- assertNoCallback ( options ) ;
476466 return $$animateQueue . push ( element , 'leave' , options , function ( ) {
477467 element . remove ( ) ;
478468 } ) ;
@@ -497,7 +487,6 @@ var $AnimateProvider = ['$provide', function($provide) {
497487 * @return {Promise } the animation callback promise
498488 */
499489 addClass : function ( element , className , options ) {
500- assertNoCallback ( options ) ;
501490 options = options || { } ;
502491 options . addClass = mergeClasses ( options . addclass , className ) ;
503492 return $$animateQueue . push ( element , 'addClass' , options ) ;
@@ -522,7 +511,6 @@ var $AnimateProvider = ['$provide', function($provide) {
522511 * @return {Promise } the animation callback promise
523512 */
524513
8000
removeClass : function ( element , className , options ) {
525- assertNoCallback ( options ) ;
526514 options = options || { } ;
527515 options . removeClass = mergeClasses ( options . removeClass , className ) ;
528516 return $$animateQueue . push ( element , 'removeClass' , options ) ;
@@ -548,7 +536,6 @@ var $AnimateProvider = ['$provide', function($provide) {
548536 * @return {Promise } the animation callback promise
549537 */
550538 setClass : function ( element , add , remove , options ) {
551- assertNoCallback ( options ) ;
552539 options = options || { } ;
553540 options . addClass = mergeClasses ( options . addClass , add ) ;
554541 options . removeClass = mergeClasses ( options . removeClass , remove ) ;
@@ -577,7 +564,6 @@ var $AnimateProvider = ['$provide', function($provide) {
577564 * @return {Promise } the animation callback promise
578565 */
579566 animate : function ( element , from , to , className , options ) {
580- assertNoCallback ( options ) ;
581567 options = options || { } ;
582568 options . from = options . from ? extend ( options . from , from ) : from ;
583569 options . to = options . to ? extend ( options . to , to ) : to ;
0 commit comments