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

Inconsistent event values for isFirst, isFinal, and eventType #38

Open
lowjam opened this issue Jun 6, 2016 · 0 comments
Open

Inconsistent event values for isFirst, isFinal, and eventType #38

lowjam opened this issue Jun 6, 2016 · 0 comments

Comments

@lowjam
Copy link

lowjam commented Jun 6, 2016

I am seeing events fired consistently but do not see isFirst set consistently on Pan and Pinch events. On Pan events, isFinal is set to true consistently, but on Pinch events isFinal is not set correctly.

It looks like eventType consistently returns a 4 a the end of an event, but does not consistently return a value of 1 when pan and pinch events start.

Other details:

  • Chrome 51.0.2704.63
  • Windows 10
  • I'm using HammerJS in a Polymer Web Component.

Here is my setup code:

var tlFrame = this.$.tlFrame;
var mc = new Hammer(tlFrame);
mc.on("pan", function(e) {
  _self.handleTrack(e);
});

mc.get('pinch').set({ enable: true });
mc.on('pinch', function(e) {
  _self.pinchScale = e.scale;

  if (e.eventType === 1) _self.consoleLog('[PINCH] Start');
  if (e.eventType === 4) _self.consoleLog('[PINCH] End');
});

When I do 4 pinch actions on my laptop touchscreen, this is the console output I see:

image

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
@lowjam and others