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

No events fired after resize with pinch zoom. #510

Closed
mmb opened this issue Mar 28, 2013 · 9 comments
Closed

No events fired after resize with pinch zoom. #510

mmb opened this issue Mar 28, 2013 · 9 comments

Comments

@mmb
Copy link

mmb commented Mar 28, 2013

After resizing an object using pinch zoom on a touch device, no events are fired. Should object.modified be fired after gestureend?

@kangax
Copy link
Member

kangax commented Mar 29, 2013

Looks like we fire "touch:gesture" event but not the others.

@kangax
Copy link
Member

kangax commented Mar 29, 2013

Actually, there's "touchend" listener which should call "__onMouseUp" and fire "object:modified" accordingly (unless something else goes wrong).

@mmb
Copy link
Author

mmb commented Mar 31, 2013

After further testing it's object:scaling that doesn't fire. I am using that to make sure that a rectangle cannot be expanded outside the canvas.

This page is the one that gets bounded when not using pinch zoom on a touch device:

http://memecaptain.com/gend_images/new?src=_k6JVg

@kangax
Copy link
Member

kangax commented Jul 29, 2014

Is this still happening?

@mmb
Copy link
Author

mmb commented Jul 30, 2014

In the version of fabric.js I'm using in this page (1.2.1), on an iPad, pinch will scale the object but will not fire object:scaling:

http://memecaptain.com/gend_images/new?src=_k6JVg

In this jsfiddle with 1.4.0, on an iPad, pinch will not scale the object. Also object:scaling never fires, even on non-touch screens.

http://jsfiddle.net/9fX8p/13/

A canvas with a background image seems to prevent the object:scaling callback.

@kangax
Copy link
Member

kangax commented Jul 30, 2014

@mmb what about latest 1.4.9?

@mmb
Copy link
Author

mmb commented Jul 31, 2014

1.4.9 behaves like 1.4.0. Pinch zoom does not scale on an iPad. Corner scaling does not fire object:scaling on an iPad or in a regular browser.

http://jsfiddle.net/9fX8p/14/

@jafferhaider
Copy link
Contributor

Hey @kangax, here's a fix for this issue. I noticed this too. The gestures code wasn't firing rotating or scaling events nor the modified event at the end. The commit below in my fork fixes this:
PosterMyWall@667a7d3

@kangax
Copy link
Member

kangax commented Jan 29, 2015

Hey @jafferhaider, thanks! Any chance you could send a PR? That would be amazing.

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

No branches or pull requests

3 participants