Well I was trying to archive this with Scroller component, actually it was very easy to do, just something like this works well in android 2.2(if you don´t have any element with translate inside your contents wrapper, it´s the #bug 12451 actually not 12541 like in comments of your code (: )
function setScale(scaleX, scaleY)
var width = (“contents”).offsetWidth;
var height = (“contents”).offsetHeight;
//new contents width
var sx = width * scaleX;
//new contents height
var sy = height * scaleY;
//scroll difference in x
var diffX = (sx – width)/2;
//scroll difference in y
var diffY = (sy – height)/2;
//translate the contents to reflect no change
// in the top/left of contents view
$(“contents”).translate( diffX, diffY);
Some easy improvement could be just zoom around a point, with additionally translate step, this will make zoom gesture handling looks better.
I hope to use this functionality in almost hardware i can not just IPhone or Android.
Again, sorry my bad English, I hope you could understand me.
We are currently building a Wink showcase webapp where one of the examples is to show how to zoom-in or zoom-out of an image using the gestures… so only available on iOS right now But I really like the way it reacts.
I’ll let you know as soon as this will be available.