Skip to content

Commit

Permalink
Add a recalculate action
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugenio Depalo committed Jul 30, 2015
1 parent 061476f commit 5d40790
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
13 changes: 10 additions & 3 deletions addon/components/as-scrollable.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import Ember from 'ember';
import InboundActionsMixin from 'ember-component-inbound-actions/inbound-actions';

export default Ember.Component.extend({
export default Ember.Component.extend(InboundActionsMixin, {
classNameBindings: [':as-scrollable', ':tse-scrollable', 'horizontal'],

horizontal: false,
autoHide: true,

Expand All @@ -14,5 +15,11 @@ export default Ember.Component.extend({

_teardownTrackpadScrollEmulator: Ember.on('willDestroyElement', function() {
this.$().TrackpadScrollEmulator('destroy');
})
}),

actions: {
recalculate: function() {
this.$().TrackpadScrollEmulator('recalculate');
}
}
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
"ember-addon"
],
"dependencies": {
"ember-cli-babel": "^5.0.0"
"ember-cli-babel": "^5.0.0",
"ember-component-inbound-actions": "0.0.3"
},
"ember-addon": {
"configPath": "tests/dummy/config"
Expand Down

0 comments on commit 5d40790

Please sign in to comment.