ember-cli-scrollbar
v0.3.0
Published
Ember addon that wraps perfect scrollbar.
Downloads
90
Readme
Ember-cli-scrollbar
Another wrapper for perfect-scrollbar. This one can be used as a mixin or component and events coming from perfect-scrollbar are directed to functions in component and send out as actions. See usage for examples.
This addon was created as compilation of ember-perfect-scroll and ember-perfect-scrollbar.
Installation
ember install ember-cli-scrollbar
Usage as mixin
import Ember from 'ember';
import PerfectScrollbarMixin from 'ember-cli-scrollbar/mixins/perfect-scrollbar';
export default Ember.Component.extend(PerfectScrollbarMixin, {
// options for perfect scrollbar
perfectScrollbarOptions: {
suppressScrollX: true,
},
// camelized name of event from perfect scrollbar
psScrollLeft(event) {
}
});
Usage as component
{{#perfect-scrollbar
perfectScrollbarOptions=(hash suppressScrollX=true)
psScrollLeft=(action "psScrollLeft")
}}
{{/perfect-scrollbar}}