Good pinch-to-zoom in image object?

Brian Milby brian at milby7.com
Thu Jan 25 00:48:59 EST 2018


I started looking for some examples and found some JS code that could
probably be adapted.  I would take a crack at it, but won't have time
probably until the weekend.  Here's the link:
https://groups.google.com/forum/#!topic/PhoneGap/QpXAzVo_Fi8

Mulling it over in my head, I wonder if it may be good to use a timer
though so we don't try to redraw faster than a decent refresh rate.
Something like when we get the touch start, set a flag and send an
UpdateImage message every x ticks.  Then the touchmove handlers would just
be updating the latest finger positions.  When the touch ends, clear the
flag (so the UpdateImages won't reactivate itself).  If moving faster than
the screen refresh, it would save some of the position math (especially in
the code referenced above).

I'm probably explaining that horribly, but it is late :)

On Wed, Jan 24, 2018 at 9:32 PM Richard Gaskin via use-livecode <
use-livecode at lists.runrev.com> wrote:

> There's a Lesson at the LC site on doing pinch-to-zoom with images, but
> it's kinda wonky (zooms okay, but at object center rather than
> touchpoint), and as I hunt around I see most people just give up an use
> a browser object.
>
> I have an app in which I'd rather not add the overhead of embedding an
> entire browser process with my process just to get a good pinch-to-zoom,
> so if there's a script out there that handles that well in an image
> object I'd be grateful for the time saved.
>
> TIA -
>
> --
>   Richard Gaskin
>   Fourth World Systems
>   Software Design and Development for the Desktop, Mobile, and the Web
>   ____________________________________________________________________
>   Ambassador at FourthWorld.com                http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list