hareeshch

Overlapping angular views

Recommended Posts

Hi,

If i continuously to trigger another animation while ngAnimate is still animating,views in angular get overlapping.

 

i am using GSAP animations for view animation (enter and leave) then i need to handle the cancellation event via a cancel callback in my animation definition.

 

Please help me with sample code for angular animation

Share this post


Link to post
Share on other sites

Hi hareeshch,

 

I'm not an Angular user myself, but you may find a few people willing to answer Angular questions around here. This is a GreenSock forum though, so we focus most of our attention on GSAP related questions and problems. That being said, you can find several posts about Angular. Just use the search feature on the upper right section of the page. Here are a few that may help:

 

http://greensock.com/forums/topic/9443-gsap-angular-js/

http://greensock.com/forums/topic/13594-greensock-tweens-in-angular-2/

http://greensock.com/forums/topic/10822-easier-animations-in-angular-13/

http://greensock.com/forums/topic/14090-gsap-with-angular-directives/

 

Happy tweening.

:)

  • Like 3

Share this post


Link to post
Share on other sites

@PointC provided some good Angular links, but I don't think they provide the answer you're looking for. However, the solution is very easy. Just position your elements absolute. This will prevent them from stacking on top each other when they are being added and removed from the DOM.

 

Some examples...

http://plnkr.co/edit/7E7HKQ?p=preview

http://plnkr.co/edit/gDtuKf?p=preview

http://codepen.io/osublake/pen/b2cbb2dd2124e04d816f517ff561e1d4

http://codepen.io/osublake/pen/2d6445c25aedbfd4cf94834ccea925a5

http://codepen.io/osublake/pen/eJBaga

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.