Reputation: 48758
I've searched around for lots of different jQuery libraries to add pinch/zoom functionality for mobile devices (like touchy.js, PhotoSwipe, TouchSwipe, hammer.js etc.) but I don't know what I should be looking for to solve this particular issue.
I need to create a simple game, very similar to "Where's Waldo?", where the user is giving a large image to scroll around (almost like Google maps), trying to find an item. When they find it, I need to take their "tap" co-ords -- taking into account the zoom level -- and see if they're right.
I feel like there's probably a library somewhere that already does 90% of what I need out of the box, but I don't know what this functionality is called. Is there such a library for this functionality?
Upvotes: 2
Views: 1139
Reputation: 9431
Why don't you use the built-in pinch zoom feature? This would save you from having to do extraneous position calculations, touch listeners, etc.
<meta name="viewport" content="initial-scale = 0.1,maximum-scale = 1.0" />
Upvotes: 2