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

ZingTouch.Expand doesn't emit any events #53

Closed
hackhat opened this issue Aug 24, 2018 · 2 comments
Closed

ZingTouch.Expand doesn't emit any events #53

hackhat opened this issue Aug 24, 2018 · 2 comments

Comments

@hackhat
Copy link

hackhat commented Aug 24, 2018

const zingPinch = new ZingTouch.Pinch({});
const zingExpand = new ZingTouch.Expand({});
zingTouchActiveRegion.bind(this.canvasElement, zingExpand, (e) => {
  // never fired!
  alert(JSON.stringify(e.detail))
});
zingTouchActiveRegion.bind(this.canvasElement, zingPinch, (e) => {
  // fires on pinch!
});

Not sure why the Expand doesn't work but the Pinch works

But if I remove the pinch

zingTouchActiveRegion.bind(this.canvasElement, zingExpand, (e) => {
  alert(JSON.stringify(e.detail))
});

the event emitted is e.detail.distance instead of e.detail.expand as stated in the docs. https://zingchart.github.io/zingtouch/docs/#expand

@mvanderkamp
Copy link
Contributor

This is a bug. See issue #45. I fixed this in PR #48 by consolidating Pinch, Expand, and Distance.

@hackhat
Copy link
Author

hackhat commented Aug 24, 2018

Ah cool. thanks

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

3 participants