-
Notifications
You must be signed in to change notification settings - Fork 216
Conversation
@gakimball I've written a pretty neat
I'm hoping to use these two methods to replace how animation works on the elements we discussed: panel, offcanvas, and notification. However, I can't append any extra animation information to these elements since these elements have built-in animation ( So, for instance for panel, I could write in the directive definition that What do you think? EDIT And we could add this logic to any element that uses foundationApi (most directives) and allow these options. It's a 4-5 liner in terms of directive logic. |
Is this using rAF, web animations, pure JS, or something else? |
@ilanbiala angular and the foundation structure to trigger animation. Plain JS and Angular's built-in features to add and remove CSS classes, do resets, and reflows. And finally, CSS transformations for the animation itself. |
Ah okay. Are these for the motion-ui? How would someone add to the set of pre-existing animations? Is it just add the animation to a CSS file, and add the data-motion attribute wherever? |
@ilanbiala The animations will follow the format prescribed by Angular's animation module, where transitions are structured like this: .transitionName {
&.ng-enter {
// Before state
&.ng-enter-active {
// After state
}
}
} Our transition mixins will allow you to create animations with more nuance, by adjusting direction, origin, timing, and so on. .customTransition {
@include slide($args...);
} But if you want to write your own totally different transitions, they'll work as long as they use the |
Sounds good! |
@gakimball this is pretty much ready to go. I'll fix the merge conflicts and we can get this into master! :) |
👍 |
Cool, will this fix/make working the motion-ui on the docs? |
Animation directives that automatically animate an element in/out without the need for specific logic for every directive. Hoping I can use it to override the activation mechanism within regular directives, highjack it, and animate to different states.