2.0.3 • Published 5 years ago

ember-cli-liquid-fire-events v2.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Ember Observer Score Build Status Coverage Status NPM Version NPM Downloads Dependency Status DevDependency Status Greenkeeper

ember-cli-liquid-fire-events

Provides a service liquid-fire-events that you can use to subscribe to the following events from Liquid Fire: transitionStart and transitionEnd.

DEMO

Compatibility

  • Ember.js v2.18 or above
  • Ember CLI v2.13 or above

Installation

ember install ember-cli-liquid-fire-events

Usage

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:

{{my-navigation-bar}}
{{! my-complex-component will not be rendered until the animation is complete}}
{{#liquid-delayed-render}}
  {{my-complex-component}}
{{/liquid-delayed-render}}

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

2.0.3

5 years ago

2.0.2

6 years ago

2.0.1

6 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago