Skip to content

Commit

Permalink
Update for Bower.
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswessels committed Apr 30, 2014
1 parent 1ef5768 commit 5c423fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm_modules
13 changes: 5 additions & 8 deletions ember-hammer.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
/**
* ember-hammer
* `Ember.View.reopen` is wrapped in an anonymous function to cache ember-hammer input dependencies in localised formal parameteres.
* @module ember-hammer
* @author Chris Wessels (https://github.com/chriswessels)
* @url https://github.com/chriswessels/ember-hammer
* @license MIT
*/
(function (window, Ember, Hammer, globalOptions, undefined) {
var defaultOptions;
defaultOptions = {
var defaultOptions = {
hammerOptions: null,
ignoreEvents: ['touchmove', 'touchstart', 'touchend', 'touchcancel']
};
Expand All @@ -24,7 +22,7 @@
});
this.set('events', events);

return this._super([].slice.call(arguments));
return this._super(Array.prototype.slice.call(arguments));
}
});
Ember.View.reopen({
Expand All @@ -50,7 +48,6 @@
}
if (this.get('gestures') && !this.get('_hammerInstance')) {
this.set('_hammerInstance', Hammer(this.get('element'), options));

}
},
/**
Expand Down Expand Up @@ -82,7 +79,7 @@

Ember.$.each(events, function (index, value) {
hammer.on(value.toLowerCase(), function (event) {
var output = self.gestures[value].apply(self, [].slice.call(arguments));
var output = self.gestures[value].apply(self, Array.prototype.slice.call(arguments));
if (output === false) {
event.stopPropagation();
}
Expand All @@ -107,7 +104,7 @@
*/
_onDidInsertElement: Ember.on('didInsertElement', function () {
this._setupGestures();
return this._super([].slice.call(arguments));
return this._super(Array.prototype.slice.call(arguments));
}),
/**
* This function is attached to the `willDestroy` view event that is fired.
Expand All @@ -116,7 +113,7 @@
*/
_onWillDestroy: Ember.on('willDestroy', function () {
this._teardownGestures();
return this._super([].slice.call(arguments));
return this._super(Array.prototype.slice.call(arguments));
}),
/**
* This function is observes the `gestures` property on the view.
Expand Down

0 comments on commit 5c423fd

Please sign in to comment.