Provides a service liquid-fire-events
that you can use to subscribe to the
following events from Liquid Fire: transitionStart
and transitionEnd
.
- Ember.js v2.18 or above
- Ember CLI v2.13 or above
ember install ember-cli-liquid-fire-events
Example usage:
export default Ember.Component.extend({
liquidFireEvents: Ember.inject.service(),
didInsertElement() {
this.get('liquidFireEvents')
.on('transitionStart', () => {
this.set('animating', true);
}).on('transitionEnd'), (newView) => {
this.set('animating', false);
});
}
});
Note: these are global events, fired every time a Liquid Fire transition occurs anywhere within the rendered DOM.
Additionally, this addon provides a component liquid-delayed-render
which
wraps a block of markup and only renders it after a transition has finished.
This is useful eg. to avoid rendering while animating, a common cause of jank
especially in mobile browsers.
Example usage:
See the Contributing guide for details.
This project is licensed under the MIT License.