4.0.0 • Published 3 years ago

ember-singularity-mixins v4.0.0

Weekly downloads
1,636
License
MIT
Repository
-
Last release
3 years ago

Ember Singularity Mixins

CI npm version

This addon consumes the unified event handling of Ember Singularity in order to provide easy-to-use and performant mixins for "spammy" events, such as scrolling, resizing, or touch events.

Note: If you use this addon, you do not need to include ember-singularity as a dependency as well.

Usage

All mixins can be imported using the following form:

import <MixinName> from 'ember-singularity-mixins/mixins/<mixin-name>';
export default Ember.Component.extend(<MixinName>);

They also have a function hook that uses the same name as the event which they handle. In other words, for the scroll-handler mixin it would simply be:

import ScrollHandler from 'ember-singularity-mixins/mixins/scroll-handler';
export default Ember.Component.extend(ScrollHandler, {
  scroll() {
    // Do stuff on scroll
  },
  // Other component properties and methods
});

Available Mixins

  1. scroll-handler
  2. resize-handler
4.0.0

3 years ago

3.0.0

4 years ago

2.2.0

4 years ago

2.1.0

6 years ago

2.0.0

6 years ago

1.3.3

6 years ago

1.3.2

6 years ago

1.3.1

7 years ago

1.3.0

8 years ago

1.2.0

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago