Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pull request #2

Merged
merged 2 commits into from Sep 4, 2012
Merged

Merge pull request #2

merged 2 commits into from Sep 4, 2012

Conversation

mgronbar
Copy link
Contributor

Fixes NEMO#107: Pinch zoom support.

@veskuh
Copy link
Contributor

veskuh commented Aug 22, 2012

Looks good to me. I tested this on N950 and works fine.

function doPinchZoom(zoom,center,centerPrev)
{
var sc=zoom*contentsScale
if(sc>=0.5 && sc<=10 ){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Please use consistent spacing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it really make sense to zoom out to 0.5? And, why 0.5?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My spacing in the IDE is wrong, I will fix it.

About Zoom limitations: I think that some times it is usefull to zoom out little bit to see more on the screen, but more than 0.5 would be too small. Also double tap on the screen zooms first in and then out to 0.5. Do you think it shouldn't be still 1?

In some other browsers, there is pinch zooming out, but after releasing pinch it will zoom back to screen width. That would be quite easy to do.

And what about maximum zoom, I set it 10, should there be limitation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see how zoom <1 might feel nicer. I think I would like if it bounced back to 1 when released, personally.

You decide on the maximum. I have no strong opinion.

@special
Copy link
Contributor

special commented Aug 30, 2012

Looks OK other than the above. I haven't tested.

@mgronbar
Copy link
Contributor Author

mgronbar commented Sep 2, 2012

I made the changes, now it bounces back to screen width, if zoom out is less than screen width.

@@ -56,9 +56,10 @@ Item {
width: parent.width
height: parent.height

x: webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width
//in case zoom is active don't move the header along panning
x: webView.zoomActive?0 : webView.contentX < 0 ? -webView.contentX : webView.contentX > webView.contentWidth-webView.width
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use parenthesis with ternary if, especially if you have two of them.

@special
Copy link
Contributor

special commented Sep 4, 2012

Code seems good, although formatting (especially spacing) is very inconsistent, and there are lines of commented out code that you could remove.

I'll give it a try, and we can merge if it goes well. Thanks for the contribution, helium is a bit neglected :)

@special
Copy link
Contributor

special commented Sep 4, 2012

Works well. Will merge, tag, and release.

Thanks.

special added a commit that referenced this pull request Sep 4, 2012
Fixes NEMO#107: Pinch zoom support
@special special merged commit 4cc989f into nemomobile:master Sep 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants