Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Ng animate #2265

Closed
wants to merge 0 commits into from
Closed

Ng animate #2265

wants to merge 0 commits into from

Conversation

mhevery
Copy link
Contributor

@mhevery mhevery commented Mar 31, 2013

No description provided.

@matsko
Copy link
Contributor

matsko commented Mar 31, 2013

Don't forget about the hidee bug inside of the $animator docs (hide doesn't show up for some reason).

@matsko
Copy link
Contributor

matsko commented Mar 31, 2013

And there are two broken (inside ngRepeat and I think <select>). I didn't want to change around the tests since I don't think this is good practice.

@karellm
Copy link

karellm commented Apr 2, 2013

I have a major issue with how enter and leave animations are triggered. My exemple relates to ng-view with two js animations:

<div ng-view ng-animate="enter: project-in; leave: project-out;"></div>

When I change the url, ng-view goes like that:
1/ trigger project-in setup
2/ trigger project-out setup
3/ trigger project-in start
4/ trigger project-out start

In my case, all of those modify a permanent object in the dom (a svg element that gets animated). So basically the sequence is wrong and break. It should do:
1/ trigger project-out setup
2/ trigger project-out start
3/ trigger project-in setup (on project-out start completion)
4/ trigger project-in start

What do you think of this? Maybe animation definition should have a async boolean.

@IgorMinar
Copy link
Contributor

@karellm can you create a plnkr or jsfiddle with the issue (us angular.js build from http://ci.angularjs.org/job/angular.js-misko/735/)?

running both animation in and out animation in paralel is intentional and common thing you want for animation.

keep in mind that in and out animation work with two different chunks of DOM (in works on chunk that is coming in and out animation works on the chunk that is being destroyed - so for a period of time we have both of these chunks of DOM in the document).

So the stuff you mentioned how you have a shared "permanent" object in the dom doesn't make sense. An example could clear this up.

@mhevery
Copy link
Contributor Author

mhevery commented Apr 2, 2013

merged

@mhevery mhevery closed this Apr 2, 2013
@karellm
Copy link

karellm commented Apr 4, 2013

@IgorMinar it is a common thing to want but that doesn't cover all situations.

Let say you have a permanent element in your dom (a svg element in my case) that will get animated on transition. Both enter and leave animation will manipulate the same dom element, so if they happen async, it gets messy.

Making the assumption that all animations should happen async feels wrong to me. It should be an option when you define the animation (async could be the default).

My exemple is special because I'm manipulating a single dom element when transitions manipulate different ones (old and new template). Though, even in that very situation, you may want the leave animation to finish before the enter one triggers.

Anyway, I'll work on a fork so you can see what I mean.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants