Hi all,

For the sake of the argument, let's assume I've got a web app with the
'viewport' meta tag set to initial-scale=1.0, maximum-scale=2.0 (or
whatever), and user-scalable=1. So I'm letting the user pinch-zoom.

After the user has pinch-zoomed in or out, is there a way to
programmatically reset their zoom/scale back to 1.0 using JavaScript
(or any other method, if there's something "magic" that I'm missing),
like when they click a "reset view" link/button?

I've had some progress: updating the <meta> tag using
viewport.setAttribute('content',...), I can change the user-scalable
flag, and that does actually change the ability to zoom in and out.
What I can't seem to figure out is if there's a way to get the scale
back to 1.0. I guess they're serious about the *initial* part of
initial-scale!

Anyone know a way to do this? Is there a DOM property someplace that
gets updated when the user pinch-zooms? I've noticed that
window.innerWidth reflects the zoomed size of the viewport, but it's
read-only (and window.sizeTo doesn't seem to do anything?).

For what it's worth, I'm using the latest iUI (0.30-beta1, very
snappy!), if that has any bearing on the problem.

Thanks much,
Adam

PS: I'm glad this list exists -- it's been very helpful getting me up
and running!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to iphonewebdev@googlegroups.com
To unsubscribe from this group, send email to 
iphonewebdev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to