Hi,
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;
$(“contents”).scale(scaleX, scaleY);
//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);
scrollerHelper.scroller.updateTargetSize(sx, sy);
}
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.