Enabling zoom without enabling unnecessary scroll

6 posts, 0 answers
  1. Robin
    Robin avatar
    40 posts
    Member since:
    Jul 2012

    Posted 08 May 2013 Link to this post

    I have made an app where I have set data-zoom="true" for some of the views.

    Enabling data-zoom then also lets the user scroll horizontally even though the content does not expand beyond the screens horizontal limit.

    Is there a way to have data-zoom enabled, but not let the user scroll if the content is "zoomed out"? 

    (It gets very annoying if the user scrolls to get down the page, and in addition to scrolling downward, the text also moves back and forth horizontally.)
  2. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 10 May 2013 Link to this post

    Hi Robin,

    If I understand you correctly, you are looking for the scrolling behavior of the iOS browser (locking the scrolling axis for each swipe). Such feature is not available currently - I would like to recommend that you suggest it in our uservoice tracker - we will consider it for future releases.

    Greetings,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Robin
    Robin avatar
    40 posts
    Member since:
    Jul 2012

    Posted 23 May 2013 Link to this post

    Hi again Petyo! 

    I'm not sure if I expressed myself clear enough. This issue is the same for both iOs and Android.

    In the view I have content that fits the width of the screen. There is no need for horizontal scrolling. With data-zoom="false" everything works fine. 

    However I wish to enable the user to use pinch-and-zoom if he wants to zoom in. If I set data-zoom="true", the zoom option is enabled. However - at the same time - horizonal scroll is enabled, causing the content to move to the left and to the right as the user scrolls further down the page (also when the page is zoomed out). This is very annoying. 

    So the question is - is it able to enable pinch-and-zoom, and at the same time avoid this unfortunate side effect?

    I've attached a picture to explain. 

  5. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 26 May 2013 Link to this post

    Hello Robin,

    Thank you for the additional clarifications. The lock behaviour I initially described was means to avoid the undesired effect you describe, without actually disabling the horizontal scrolling hint. Unfortunately, I can't suggest a workaround for this behaviour, currently. If the uservoice suggestion gathers some votes, we will revisit this implementation for future releases.

    I am sorry for the inconvenience,

    Petyo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Robin
    Robin avatar
    40 posts
    Member since:
    Jul 2012

    Posted 26 May 2013 Link to this post

    Thank you Petyo!

    Would it be possible to enable/disable the data-zoom feature programmatically? 

    Allowing the user to toggle the zoom feature would be a nice workaround.
  7. Petyo
    Admin
    Petyo avatar
    2439 posts

    Posted 29 May 2013 Link to this post

    Hello Robin,

    I checked the codebase for such option. The zoom configuration option is parsed when the scroller is initialized in order to attach event listeners to gestures like pinch and zoom. Enabling and disabling those handlers is not exposed as (even internal) convenient method which I could suggest. 

    I am sorry for the inconvenience caused. 

    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