Is there any code floating around demonstrating ‘pinch and zoom’ on mobile deviecs?
Thanks
Is there any code floating around demonstrating ‘pinch and zoom’ on mobile deviecs?
Thanks
Not to my knowledge, but it should be fairly simple to implement. Now, with that said, there are some issues with multi touch (pressed and/or released events can get lost), but @sven actually fixed this today so multi-touch should be 100% ok from the next release.
Regardless of the potential current issue with multi touch I’d keep track of touch points and when two points are detected I’d keep track of their initial positions and while two points are tracked the zoom level would be dictated by the ratio between the initial distance of the points and the current distance. Now, you probably also want to center the zoom on the midpoint between the initial positions of the two touch points, and that can potential be the tricky part.