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

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

2 Answers 258 Views
ScrollView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 15 Mar 2014, 01:07 AM
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:
-Events:
  AboutToChange (I don't understand the Changing-Event... It fires when the user already made a full transition... or is this a Chrome-Bug?)
  Cancled
-Methods:
  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.

Cheers,
Richard

2 Answers, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 17 Mar 2014, 02:51 PM
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.

Regards,
Alexander Valchev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Richard
Top achievements
Rank 1
answered on 18 Mar 2014, 01:38 PM
Hi Alexander

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

Cheers!
Tags
ScrollView (Mobile)
Asked by
Richard
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Richard
Top achievements
Rank 1
Share this question
or