From 4f84f6b3e4210ae1eb14728a46d43dd961700a0c Mon Sep 17 00:00:00 2001 From: Matias Niemelä Date: Fri, 14 Feb 2014 04:02:46 -0500 Subject: fix($animate): ensure $animate doesn't break natural CSS transitions BREAKING CHANGE: ngClass and {{ class }} will now call the `setClass` animation callback instead of addClass / removeClass when both a addClass/removeClass operation is being executed on the element during the animation. Please include the setClass animation callback as well as addClass and removeClass within your JS animations to work with ngClass and {{ class }} directives. Closes #6019 --- test/ng/compileSpec.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'test/ng/compileSpec.js') diff --git a/test/ng/compileSpec.js b/test/ng/compileSpec.js index e9ab15e4..98b1650f 100755 --- a/test/ng/compileSpec.js +++ b/test/ng/compileSpec.js @@ -4666,11 +4666,9 @@ describe('$compile', function() { $rootScope.$digest(); data = $animate.queue.shift(); - expect(data.event).toBe('removeClass'); - expect(data.args[1]).toBe('rice'); - data = $animate.queue.shift(); - expect(data.event).toBe('addClass'); + expect(data.event).toBe('setClass'); expect(data.args[1]).toBe('dice'); + expect(data.args[2]).toBe('rice'); expect(element.hasClass('ice')).toBe(true); expect(element.hasClass('dice')).toBe(true); -- cgit v1.2.3