Zoom out on start

6 posts, 0 answers
  1. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 11 Mar 2015 Link to this post

    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


  2. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 11 Mar 2015 in reply to Anthony Link to this post

    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
  3. Kendo UI is VS 2017 Ready
  4. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 11 Mar 2015 Link to this post

    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.
  5. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 13 Mar 2015 Link to this post

    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!
     
  6. Anthony
    Anthony avatar
    122 posts
    Member since:
    Jun 2013

    Posted 13 Mar 2015 in reply to Petyo Link to this post

    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.
  7. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 17 Mar 2015 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready