javascript - Angular 2 animating transition based on dynamic value instead of time -


while understand angular 2's animate used animate transition between states in fixed time, not convenient.

in case, have slide-able element, wish animate based on how far have moved default position. is, want provide handler dynamically with, example float number between 0 , 1 representing how far along animation should be. can angular 2 framework handle this? can perhaps, somehow, bypass default animate(time) property, , directly call underlying function changes css?

i'm not 100% clear on problem, don't think you're asking possible angular animations. angular's animations built on top of web animation api, streamlined means of interacting css animations. css animations defined keyframes + durations (see https://css-tricks.com/almanac/properties/a/animation/).

theoretically, create complex set of keyframes "stepped through" based on position of slide-able element, hack , not you're asking for.

to accomplish goal, think you'll need use custom javascript or find outside library you. you're little vague on project details, but, example, library tether might you.


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -