-
Notifications
You must be signed in to change notification settings - Fork 84
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
ZoomGesture: infinity scaleX/scaleY when touching and clicking #76
Comments
@rdoi totally shouldn't. I've added some logging (check out recent commits in develop). You can compile against source code (but you will need to add conditional compilation flag CONFIG::GestouchDebug true) or build debug swc first: or Ant: check out the logs and we'll see what kind of problem between touch and mouse events you have. |
Well, I am not sure if I've expressed myself correctly. There is a problem in the zoom gesture recognition when a mouse and touch happens at same time, in which the reported scale (offset) returns an "Infinity" value. Its probably because the OS (Windows) "moves" the mouse cursor to where a touch happens. Its true also when you are still pressing down the mouse button, and touch the screen somewhere else. So, when the 2nd real touch is recognized, the first touch (the mousedown) position is reported in the same place than the 2nd touch. And if you try to calculate the distance between these 2 points you get a 0, hence returning a "Infinity" if you use it as divisor. ZoomGesture.onTouchMove: around #117
|
@rdoi yeah, I understood you. But as we didn't have any real information about how OS delivers input information to the Flash runtime, I added logging. With it we can see exactly what is the input (events, ids and positions). No point to speculate, just try it =) |
This is a very specific situation when using a device that have both mouse and touch capabilities (Win8).
If you click down with the mouse (keep pressed) and then touch and pan around with the finger somewhere else, a ZoomGesture is detected with a serie of scaleX and scaleY with 0 and "Infinity" values.
Not sure what should be the best behavior in this case, but I think "Infinity" value should not happen.
Here is a quick code:
The text was updated successfully, but these errors were encountered: