Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

show a replaceable solution if this lib is deprecated #22

Open
mohamnag opened this issue Aug 5, 2014 · 3 comments
Open

show a replaceable solution if this lib is deprecated #22

mohamnag opened this issue Aug 5, 2014 · 3 comments

Comments

@mohamnag
Copy link

mohamnag commented Aug 5, 2014

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
Copy link
Member

ppcano commented Aug 5, 2014

@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
Copy link
Author

mohamnag commented Aug 6, 2014

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

@runspired
Copy link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants