Lost Password
Create an Account

Your username must be unique, and cannot be changed later.

We use your email address to email you a secure password and verify your account.

Scroll layout – Zoom

HomeForumsWink uiScroll layout – Zoom

This topic has 3 voices, contains 5 replies, and was last updated by  admin 576 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
November 20, 2011 at 3:13 pm #link

Hi,

First of all, I like to say thanks for this greate job, cool and easy :)

I will try to implement zoom handling with the scroll layout, maybe you could give some advice or a direction to start.

By the way, sorry my bad English.

November 21, 2011 at 7:25 am #link

Hi,

Could you tell us a bit more? Would you like to enable the native zoom? Or would you like to implement it yourself on a given zone by listening to gestures events for instance?

On which platform do you try to run it? iOS only or more?

Finally, you talk about the scroll layout but do you refer to the “scroller” component or to the “fixed layout” component?

Jérôme

November 21, 2011 at 2:14 pm #link

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.

November 21, 2011 at 3:04 pm #link

Hello,

Thanks for your feedback, it looks good and easy.

We will test it further in order to detect limitations (gesture, scale issue, zoom-out limit, side effect with multiple kinds of contents).

Sylvain

November 21, 2011 at 6:54 pm #link

Yep, that will be great to have zoom inside a layout, so you could have your content zoomed, but your application UI intact.

November 22, 2011 at 7:09 am #link

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.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.