chriswessels / ember-hammer

ember-hammer is a neat interface for defining Hammer.js gestural behaviour in your Ember.js Views.

Home Page:https://github.com/chriswessels/ember-hammer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't define customEvents in Ember.Application

kvas-damian opened this issue · comments

According to http://emberjs.com/api/classes/Ember.Application.html#property_customEvents it should be possible to define custom events in Ember.Application, although when using ember-hammer this feature doesn't work.

The issue:
customEvent aren't passed correctly to Ember.EventDispatcher

Ember.EventDispatcher expects addedEvents and rootElement as separate parameters (https://github.com/emberjs/ember.js/blob/680f997ed0958c420abdcd0b1673111aee26afe7/packages/ember-views/lib/system/event_dispatcher.js#L131)

Instead of passing them separately ember-hammer passes an array: Array.prototype.slice.call(arguments) (https://github.com/chriswessels/ember-hammer/blob/master/ember-hammer.js#L161)

Fixed by #17. Thanks @kvas-damian!