Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pan events on components duplicate if verticalPanMixin is used #64

Open
ssendev opened this issue Jul 3, 2015 · 2 comments
Open

pan events on components duplicate if verticalPanMixin is used #64

ssendev opened this issue Jul 3, 2015 · 2 comments

Comments

@ssendev
Copy link
Contributor

ssendev commented Jul 3, 2015

related to #63

ember init
ember install ember-mobiletouch
// app/components/my-component.js
import Ember from 'ember';
import VerticalPanMixin from "ember-mobiletouch/mixins/vertical-pan";

// export default Ember.Component.extend({
export default Ember.Component.extend(VerticalPanMixin,{
  panConfiguration: {direction: Hammer.DIRECTION_HORIZONTAL},
  panEnd(e) {
    console.log('component');
    console.log(e);
  }
});
<!-- app/templates/application.hbs -->
<h2 id="title">Welcome to Ember.js</h2>
{{my-component}}
<!-- app/templates/components/my-component.hbs -->
<h1>my component</h1>

and for every panend two panends are fired. this even happens if the mixin is not on the component itself e.g. the application-view. on the application-view even with mixin only one panend is fired

--edit
okay this was on master on 2.0 events also duplicate on views

@runspired
Copy link
Owner

http://codepen.io/runspired/pen/XbGJYr?editors=001

This shouldn't be happening, am investigating.

@runspired
Copy link
Owner

This turns out to be mostly a bug in Hammer's configuration for managers and recognizers leaking which will be fixed in Hammer 2.0.5.

There may be a secondary issue I'll peak at as well.

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

No branches or pull requests

2 participants