emberjs-addons / ember-touch

A lightweight library for building and using touch gestures with Ember Applications
MIT License
182 stars 28 forks source link

show a replaceable solution if this lib is deprecated #22

Open mohamnag opened 10 years ago

mohamnag commented 10 years ago

The story is long, but just to cut it short, I was is search of a plugin to include gesture events in my ember application that I found multiple tutorials pointing to this library. so I came here and unfortunately I saw this marked as "unmaintained". and only a single hint that functionality is moved to hammerJS.

as obviously the hammerJS does not include the out of the box integration with emberjs, it would be nice to show a replaceable solution to this lib.

ppcano commented 10 years ago

@mohamnag, below a possible integration. You should also ask in stackoverflow:

Em.View.extend({
  ...
  setupTap: function() {

    var self = this;
    this.hammer = new Hammer(this.get('element'), {recognizers: []});

    var tap = new Hammer.Tap();

    tap.set('enable', function() {
      return self.canRecognizeTap();
    });
    this.hammer.add(tap);

    this.hammer.on('tap', function() {
      self.tap();
    });

  }.on('didInsertElement')
})
mohamnag commented 10 years ago

thanks for the code but I hoped it will be another lib.

runspired commented 9 years ago

@mohamnag https://github.com/runspired/ember-mobiletouch