Commit graph

45 commits

Author SHA1 Message Date
Peter Deak
c42d0a0418 fix(ngAnimate): correctly retain and restore existing styles during and after animation
Closes #4869
2013-11-21 23:37:01 -05:00
Matias Niemelä
6760d7a315 fix($animate): ensure keyframe animations are blocked around the reflow
Keyframe animations trigger on the first CSS class and not the second.
This may cause a slight flicker during a stagger animation since the
animation has already started before the stagger delay is considered.
This fix ensures that the animation is blocked until the active animation
starts which allows for staggering animations to take over properly.

Closes #5018
2013-11-21 20:48:15 -05:00
Matias Niemelä
062fbed8fc fix($animate): ensure transition animations are unblocked before the dom operation occurs
Transitions are blocked when the base CSS class is added at the start of the animation. This
causes an issue if the followup CSS class contains animatable-styles. Now, once the animation
active state is triggered (when the animation CSS dom operation occurs) the animation itself
will always trigger an animate without a quick jump.

Closes #5014
Closes #4265
2013-11-21 20:48:07 -05:00
Matias Niemelä
76e4db6f3d fix($animate): ensure addClass/removeClass animations do not snap during reflow
Closes #4892
2013-11-21 20:47:55 -05:00
Matias Niemelä
1d50663b38 fix(ngAnimate): use a fallback CSS property that doesn't break existing styles
The clip property seems to remove the box-shadow property when an absolute
positioned animation is ongoing. This fix changes the property to be border-spacing
which is also very underused. The border-spacing CSS property is only visible
when border-collapse is set to separate.

Closes #4902
Closes #5030
2013-11-20 20:54:07 -05:00
Matias Niemelä
7067a8fb0b fix($animate): ensure the DOM operation isn't run twice
Depending on the animations placed on ngClass, the DOM operation may
run twice causing a race condition between addClass and removeClass.
Depending on what classes are removed and added via $compile this may
cause all CSS classes to be removed accidentally from the element
being animated.

Closes #4949
2013-11-20 17:08:03 -05:00
Pete Bacon Darwin
aea76f0d5c fix(animateSpec): run digest to enable animations before tests 2013-11-08 01:03:18 -08:00
Matias Niemelä
9470080762 fix($animate): only apply the fallback property if any transition animations are detected 2013-11-06 02:01:19 -05:00
Matias Niemelä
9d69a0a7c7 feat($animate): ensure CSS transitions can work with inherited CSS class definitions
BREAKING CHANGE

ngAnimate addClass / removeClass animations are now applied right away. This means
that as soon as the animation starts the class will be added (addClass) or removed
(removeClass) to the element being animated instead of after the -add-active /
-remove-active animations are completed. This allows for animations outside of
ngAnimate to not conflict with $animate.

This commit introduces beforeAddClass and beforeRemoveClass animation event functions and
executes any addClass and removeClass event functions AFTER the class has been added or
removed (this is opposite functionality of how ngAnimate used to work when performing
JS-enabled animations addClass / removeClass animations). If your animation code relies on
any animations being performed prior to the class change then simply use the new
beforeAddClass and beforeRemoveClass animation event functions.

Finally, when animating show and hide animations using CSS transitions or keyframe animations,
ng-hide-remove doesn't require `display:block!important` for ng-hide-add anymore.
2013-11-05 21:15:59 -08:00
Matias Niemelä
7d2d2575a2 chore(animateSpec): provide meaningful CSS class names in animation tests 2013-11-05 21:46:07 -05:00
Matias Niemelä
b89584db10 fix($animate): avoid hanging animations if the active CSS transition class is missing
Closes #4732
Closes #4490
2013-11-05 21:45:36 -05:00
Matias Niemelä
41a2d5b30f fix($animate): ensure staggering animations understand multiple delay values 2013-11-05 21:44:25 -05:00
Matias Niemelä
e53ff431e1 fix($animate): ensure the active class is not applied if cancelled during reflow
Closes #4699
2013-11-05 21:44:02 -05:00
Matias Niemelä
952fea69fb chore(ngAnimate): ensure elapsedTime values are in seconds and millseconds 2013-11-05 21:42:42 -05:00
Matias Niemelä
d434eabec3 fix($animate): use direct DOM comparison when checking for $rootElement
Closes #4679
2013-10-28 22:47:47 -07:00
Matias Niemelä
7f0767acab fix($animate): ensure former nodes are fully cleaned up when a follow-up structural animation takes place
Closes #4435
2013-10-28 21:26:35 -07:00
Matias Niemelä
6818542c69 fix($animate): ensure enable/disable animations work when the document node is used
Closes #4669
2013-10-28 14:26:07 -07:00
Matias Niemelä
7484830744 feat(ngAnimate): provide support for staggering animations with CSS 2013-10-28 15:00:47 -06:00
Matias Niemelä
76b628bcb3 fix($animate): skip unnecessary addClass/removeClass animations
Skip addClass animations if the element already contains the class that is being
added to element. Also skip removeClass animations if the element does not contain
the class that is being removed.

Closes #4401
Closes #2332
2013-10-24 17:35:57 -04:00
Matias Niemelä
2623de1426 fix($animate): ensure animations work properly when the $rootElement is being animated
Closes #4397
Closes #4231
2013-10-23 07:26:41 -04:00
Matias Niemelä
f5289fe84f fix($animate): only cancel class-based animations if the follow-up class contains CSS transition/keyframe animation code
Closes #4463
Closes #3784
2013-10-23 07:08:03 -04:00
Matias Niemelä
b1e604e38c fix($animate): perform internal caching on getComputedStyle to boost the performance of CSS3 transitions/animations
Closes #4011
Closes #4124
2013-10-10 17:35:36 -07:00
Matias Niemelä
cc5846073e fix($animate): ensure structural animations skip all child animations even if no animation is present during compile
Closes #3215
2013-10-10 17:35:36 -07:00
Matias Niemelä
23c698821f refactor($animate): queue all successive animations to use only one reflow 2013-10-10 17:35:36 -07:00
Matias Niemelä
3f31a7c769 fix($animate): cancel any ongoing child animations during move and leave animations 2013-10-10 17:35:36 -07:00
Matias Niemelä
079dd93991 fix($animate): ensure elapsedTime always considers delay values 2013-10-10 17:35:36 -07:00
Matias Niemelä
2a63dfa6cc fix($animator): avoid completing the animation asynchronously unless CSS transtiions/animations are present
Closes #4023
Closes #3940
2013-10-01 15:00:16 -04:00
Michał Gołębiowski
ac2d06b19d chore($ngAnimate): simplify vendor prefixes handling in tests 2013-10-01 10:00:43 -04:00
Matias Niemelä
2df3c9f58d fix($animate): ensure transition-property is not changed when only keyframe animations are in use
Closes #3933
2013-09-30 10:59:28 -07:00
Matias Niemelä
0a63adce68 fix(ngAnimate): ensure that delays are always considered before an animation closes
Closes #4028
2013-09-26 11:19:43 -07:00
Matias Niemelä
d50ed6bfb8 fix(ngAnimate): check elapsedTime on current event
onAnimationProgress now checks the event's elapsedTime property before
checking the originalEvent.elapsedTime property.
Use browserTrigger with elapsedTime parameter to trigger animation events
2013-09-06 22:19:53 +01:00
Matias Niemelä
32ad292611 refactor($animate): use CSS3 transition/animation events instead of $timeouts to track ongoing animations
Closes #3629
Closes #3874
2013-09-05 17:20:28 -04:00
Matias Niemelä
36ad40b18c fix(ngAnimate): ensure that ngClass is always compiled before enter, leave and move animations
Closes #3727
Closes #3603
2013-09-03 17:06:49 -07:00
Matias Niemelä
4382df03fa fix(ngAnimate): cut down on extra $timeout calls 2013-09-03 17:06:49 -07:00
Igor Minar
92700509c8 test(docs): disable brittle tests that need to be rewritten 2013-08-25 14:46:54 -07:00
Igor Minar
9b94169aaa style(animateSpec): remove ws 2013-08-25 14:46:54 -07:00
Matias Niemelä
7c605ddf1c fix($animate): skip ngAnimate animations if the provided element already has transitions/durations attached to it
Closes #3587
2013-08-23 14:04:35 -07:00
Matias Niemelä
ee2f3d21da fix($animate): only execute a timeout when transitions or keyframe animations are used
ngAnimate causes a 1ms flicker on the screen when no CSS animations are present on the element.
The solution is to change $animate to only use $timeouts when a duration is found on the element
before the transition/keyframe animation takes over.

Closes #3613
2013-08-23 14:04:35 -07:00
Matias Niemelä
fb3a7db080 feat(ngMock): add support for creating dynamic style sheets within test code 2013-08-23 14:04:35 -07:00
Matias Niemelä
2430347ece fix(ngAnimate): make sure that the class value passed into addClass/removeClass is the base class string value 2013-08-09 14:39:58 -07:00
Matias Niemelä
f61ff69519 chore(ngAnimate): fix incomplete animation test 2013-08-09 14:39:58 -07:00
Matias Niemelä
e31104fa6c fix($animate): make animation onComplete callbacks async 2013-07-26 23:49:54 -07:00
Matias Niemelä
15389b0e37 fix(ngAnimate): $timeout integration and cancel callbacks added 2013-07-26 23:49:54 -07:00
Matias Niemelä
8ed0d5b6aa chore($animate): replace show/hide with addClass/removeClass 2013-07-26 23:49:54 -07:00
Matias Niemelä
81923f1e41 feat(ngAnimate): complete rewrite of animations
- ngAnimate directive is gone and was replaced with class based animations/transitions
- support for triggering animations on css class additions and removals
- done callback was added to all animation apis
- $animation and $animator where merged into a single $animate service with api:
  - $animate.enter(element, parent, after, done);
  - $animate.leave(element, done);
  - $animate.move(element, parent, after, done);
  - $animate.addClass(element, className, done);
  - $animate.removeClass(element, className, done);

BREAKING CHANGE: too many things changed, we'll write up a separate doc with migration instructions
2013-07-26 23:49:54 -07:00