material icon indicating copy to clipboard operation
material copied to clipboard

Hierarchical Timing Animation Directive

Open cozyazure opened this issue 11 years ago • 2 comments

Hi,

I have done up a directive on Hierachical Timing. I wonder if this directive would be useful enough to serve the use cases of displaying a list of items.

Here is the link to the codepen: http://codepen.io/cozyazure/pen/ZGoBZW

Feature / Usage: For any items that you want to have hierarchical timing animation, just wrap it with hierachy-display. Works with ng-repeat.

Possible improvements to be done on this directive:

  1. Probably need to implement a new child directive, say hierachy-display-item. Write now I am animating every single dom elements that goes under the hierachy-display.
  2. Exponential time functions for the animation to delay instead of linear ones. Current delay function is index divide by 10.
  3. As of point 1, have a child directive that listens to parent hierachy-display. Remove $timeout. I am using $timeout for a workaround to ensure ng-repeat is rendered before the animations kicks in.

I apologize as I am relatively very new to Github and big-scale open source project. Let me know if this has been a duplicated issue /new feature request. I searched through the issue list and only found #206

Also let me know if I can submit a pull request and contribute to this awesome project.

cozyazure avatar Jul 09 '15 18:07 cozyazure

The animation looks nice!

I see you are doing the animation 'by hand'. Have you looked into the $animate service? Although I haven't use that service myself, I think that's the way to go with animation in AngularJS; this project also uses it for several animations.

Frank3K avatar Jul 09 '15 21:07 Frank3K

Please post this in the Angular Material Forum or the Angular Forum

ThomasBurleson avatar Jul 10 '15 00:07 ThomasBurleson