@@ -4,13 +4,6 @@ var $animateMinErr = minErr('$animate');
4
4
var ELEMENT_NODE = 1 ;
5
5
var NG_ANIMATE_CLASSNAME = 'ng-animate' ;
6
6
7
-
8
- function assertNoCallback ( param ) {
9
- if ( isFunction ( param ) ) {
10
- throw $animateMinErr ( 'nocb' , 'Do not pass a callback to animate methods' ) ;
11
- }
12
- }
13
-
14
7
function mergeClasses ( a , b ) {
15
8
if ( ! a && ! b ) return '' ;
16
9
if ( ! a ) return b ;
@@ -423,7 +416,6 @@ var $AnimateProvider = ['$provide', function($provide) {
423
416
* @return {Promise } the animation callback promise
424
417
*/
425
418
enter : function ( element , parent , after , options ) {
426
- assertNoCallback ( options ) ;
427
419
parent = parent && jqLite ( parent ) ;
428
420
after = after && jqLite ( after ) ;
429
421
parent = parent || after . parent ( ) ;
@@ -450,7 +442,6 @@ var $AnimateProvider = ['$provide', function($provide) {
450
442
* @return {Promise } the animation callback promise
451
443
*/
452
444
move : function ( element , parent , after , options ) {
453
- assertNoCallback ( options ) ;
454
445
parent = parent && jqLite ( parent ) ;
455
446
after = after && jqLite ( after ) ;
456
447
parent = parent || after . parent ( ) ;
@@ -472,7 +463,6 @@ var $AnimateProvider = ['$provide', function($provide) {
472
463
* @return {Promise } the animation callback promise
473
464
*/
474
465
leave : function ( element , options ) {
475
- assertNoCallback ( options ) ;
476
466
return $$animateQueue . push ( element , 'leave' , options , function ( ) {
477
467
element . remove ( ) ;
478
468
} ) ;
@@ -497,7 +487,6 @@ var $AnimateProvider = ['$provide', function($provide) {
497
487
* @return {Promise } the animation callback promise
498
488
*/
499
489
addClass : function ( element , className , options ) {
500
- assertNoCallback ( options ) ;
501
490
options = options || { } ;
502
491
options . addClass = mergeClasses ( options . addclass , className ) ;
503
492
return $$animateQueue . push ( element , 'addClass' , options ) ;
@@ -522,7 +511,6 @@ var $AnimateProvider = ['$provide', function($provide) {
522
511
* @return {Promise } the animation callback promise
523
512
*/
524
513
removeClass : function ( element , className , options ) {
525
- assertNoCallback ( options ) ;
526
514
options = options || { } ;
527
515
options . removeClass = mergeClasses ( options . removeClass , className ) ;
528
516
return $$animateQueue . push ( element , 'removeClass' , options ) ;
@@ -548,7 +536,6 @@ var $AnimateProvider = ['$provide', function($provide) {
548
536
* @return {Promise } the animation callback promise
549
537
*/
550
538
setClass : function ( element , add , remove , options ) {
551
- assertNoCallback ( options ) ;
552
539
options = options || { } ;
553
540
options . addClass = mergeClasses ( options . addClass , add ) ;
554
541
options . removeClass = mergeClasses ( options . removeClass , remove ) ;
@@ -577,7 +564,6 @@ var $AnimateProvider = ['$provide', function($provide) {
577
564
* @return {Promise } the animation callback promise
578
565
*/
579
566
animate : function ( element , from , to , className , options ) {
580
- assertNoCallback ( options ) ;
581
567
options = options || { } ;
582
568
options . from = options . from ? extend ( options . from , from ) : from ;
583
569
options . to = options . to ? extend ( options . to , to ) : to ;
0 commit comments