ScrollView is missing a lot of essential functionality... (?)

3 posts, 0 answers
  1. Richard
    Richard avatar
    5 posts
    Member since:
    Mar 2014

    Posted 14 Mar 2014 Link to this post

    Hey guys

    I have pages inside my scroll-view which provides an interactive "settings-mechanism".
    What that means is my application will react to a vertical "swipe-gesture", and will change time-settings according to the scrollView-page.

    This works very smooth and I'm quite happy as these are my first "kendo-UI steps".
    Now the problem begins once you don't swipe straight, but your vertical movement is enough to trigger the "start page-change"-animation.
    So what I need to do is to disable the scrollView, once the settings-adjustment got initiated.

    My workaround is to disable this functionallity when I detect a more vertical swipe than a horizontal one (through dragstart & drag).
    But this is not good for the enduser as he can start a settings-adjustment on the page and then change to a scrollView-page-transition with the same movement. 

    On my journey to find a solution, I was mainly looking for a way to achive these events/methods:
      AboutToChange (I don't understand the Changing-Event... It fires when the user already made a full transition... or is this a Chrome-Bug?)
      Enable / Disable the ScrollView

    Like in the title mentioned, I thing these are quite essential things...I don't feel like I'm doing something very exotic here, or am I?
    Maybe I'm missing something, because I can't find threads about that here, nor on stackoverflow.

    So are there truely no workarounds / properties / whatever to "fix" my problem? Or should I change my widget with something else (maybe from the community?).

    Thank you very much.

  2. Alexander Valchev
    Alexander Valchev avatar
    2873 posts

    Posted 17 Mar 2014 Link to this post

    Hello Richard,

    Thank you for the feedback, I will forward it to the team.
    Changing event is supposed to before the page changes but after user starts page transition animation. If you want to disable the swiping earlier you can use the following workaround:
    var scrollview = $("[data-role=scrollview]").getKendoMobileScrollView();
    var cancel = function() { this.cancel(); };
    scrollview.pane.userEvents.bind("start", cancel); //disable the pages movement
    scrollview.pane.userEvents.unbind("start", cancel); //enable the pages movement

    I hope this solution will fit in your scenario.

    Alexander Valchev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Richard
    Richard avatar
    5 posts
    Member since:
    Mar 2014

    Posted 18 Mar 2014 in reply to Alexander Valchev Link to this post

    Hi Alexander

    Thank you very much.
    Your support is awesome and your codesnipped helps me a lot!

Back to Top