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

Zoom out on start

5 Answers 124 Views
View
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 11 Mar 2015, 10:59 AM
Hi
  This seems like such a simple thing but I can't find out how to get this working

I have a view, data-zoom="true", containing a long image. I just want it to zoom out when the view opens such that it contains the full width of the image, the height is small in comparison.

I've tried things like

var scroller = $("#detailSection").data("kendoMobileView").scroller;
scroller.zoomOut();

(this actually zooms in)

and trying to get the -webkit-transform

//var scroll = scroller.scrollElement.css("-webkit-transform");

but no avail. 

Is there a simple way of doing this? It must be a common request

thanks


5 Answers, 1 is accepted

Sort by
0
Anthony
Top achievements
Rank 1
answered on 11 Mar 2015, 11:03 AM
b.t.w. I have tried data-stretch="true" but 
(a) it still showed the image without zooming out
(b) it wouldn't work for us anyway as it disables zoom, the user will want to zoom in
0
Anthony
Top achievements
Rank 1
answered on 11 Mar 2015, 11:06 AM
Last thing :-) (sorry, these forums could really do with an edit button)

If you try to zoom out as much as possible it will only let you zoom out enough to perfectly fit in the image width, so there must be logic to do this.
0
Petyo
Telerik team
answered on 13 Mar 2015, 07:43 AM
Hi Anthony,

If I understand your case correctly, the feature you describe is not supported. The mobile scroller is in a "zoom to fit" mode - you can't zoom out to the larger dimension (zoom to fill).  

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Anthony
Top achievements
Rank 1
answered on 13 Mar 2015, 07:48 AM
Ok, it's not standard, however you must be doing it internally as you can't zoom out past the 'zoom to fill' mark. Is there anyway of getting access to the mechanism for doing this?
  The only way I could think of is to find the content with the transition scale, find the size of the image and the width of the screen and try to set it accordingly, although that may be arkward across multiple browsers.
  I'm surprised it's not asked for more, I want to toggle between zoomed in on a particular feature and zoomed out so you can see the whole picture.
0
Petyo
Telerik team
answered on 17 Mar 2015, 08:11 AM
Hello Anthony,

I am afraid that the only way to implement the behavior you describe is to modify the Kendo UI source code - keep in mind that we don't provide support for modified versions of our library. 

Of course, you may consider submitting the feature as a request in our uservoice portal - we will consider it in case it is a popular one.

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
View
Asked by
Anthony
Top achievements
Rank 1
Answers by
Anthony
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or