This is a migrated thread and some comments may be shown as answers.

Pinch and zoom

1 Answer 128 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mat-Moo
Top achievements
Rank 1
Mat-Moo asked on 22 Jan 2013, 09:05 PM
On my images with pinch and zoom,  you can make the image smaller but when you let go it re-expands to fill the screen again in both directions. This means in most cases you can't see the whole image? Is there a setting on the zoom to stop this behavior? Got my app going live in just over a week and this is one item is what the client has complained about/noted! EECK! So close to getting this first app complete...

Also on the same note, on a Samsung Galaxy S2 with 4.0.4 on it images / image maps get broken - Will have to show a video demo of this as it's hard to explain. Wondering if it has anything to do with setting the zoomable images at runtime though.

1 Answer, 1 is accepted

Sort by
0
Kristian D. Dimitrov
Telerik team
answered on 24 Jan 2013, 08:47 AM
Hello Mat-Moo,

We reported the issue to Kendo team and it is now logged inside their tracking system.

For now the workaround is to append a button at run-time and when it is clicked to reset the transformations on the scroll element, like shown bellow:

<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta charset="utf-8" />
        <link href="kendo/styles/kendo.mobile.all.min.css" rel="stylesheet" />
        <link href="styles/main.css" rel="stylesheet" />
 
    </head>
    <body>
        <div id="test" data-role="view" data-title="Photo viewer" data-zoom="true" data-strech="true">
             
            <header data-role="header">
                <div data-role="navbar">
                    <span data-role="view-title"></span>
                </div>
            </header>
 
            <div data-role="content">
                <div id="zoomable-explanation">
                    The contents of this mobile view are zoomable using pinch/zoom gestures. <br />
                    To test this, open the Kendo UI demos on a mobile device, which supports multi-touch gestures.
                </div>
                <img src="images/ice.png" />
            </div>
        </div>
 
        <script src="cordova.js"></script>
        <script src="kendo/js/jquery.min.js"></script>
        <script src="kendo/js/kendo.mobile.min.js"></script>
 
        <script>
            var app = new kendo.mobile.Application(document.body);
            $("#test").append('<button id="reset">Reset</button>');
            $("#reset").on("touchend",function(){
                app.scroller().scrollElement.css("-webkit-transform", "");
            })
        </script>
    </body>
</html>
  Regards,
Kristian D. Dimitrov
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
Tags
General Discussion
Asked by
Mat-Moo
Top achievements
Rank 1
Answers by
Kristian D. Dimitrov
Telerik team
Share this question
or