Pinch zoom with focus panning #13998
Replies: 2 comments
-
Side note: you could use external modules for cropping: https://github.com/m1ga/ti.imagecrop Idea: Untested and just a theory :) I would look at some web examples, maybe you'll find a way to do it there and can adapt it to Ti views. |
Beta Was this translation helpful? Give feedback.
-
Thanks, We've got cropping working and I've looked at that module. What you're describing sounds like the direction we need to go in, I'm finding examples online are mixed atm. But I'll keep looking less anyone has any specific advice. |
Beta Was this translation helpful? Give feedback.
-
We've created an Instagram style image edit/uploader, most features are working well but we are struggling to figure out pinch to zoom with focus panning.
This is part of a much larger application, so I'll explain the overall flow.
Basic flow:
This generally works fine, but isn't elegant. What we want is a flow closer to instagram where the image will pan during zoom to the pinch focus. We're reading the pinch focusX and foxusY, and if we display those co-ords on screen as a square it matches where the user is pinching.
What we're struggling to figure out is how to pan the image to the focusX/Y during zoom so that the focus point centres in the bounds guide.
Does anyone know how to utilise focusX and focusY in this manner? Or able to point us in the right direction?
Beta Was this translation helpful? Give feedback.
All reactions