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

.scrollTo() without animation

2 Answers 165 Views
ScrollView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Vladimir
Top achievements
Rank 1
Vladimir asked on 15 Jan 2013, 07:57 PM
Hello

Is any way to temporary disable animation for .scrollTo(page) method?
I tried something like this:
that._ScrollView.duration = 1;
that._ScrollView.scrollTo(activePage);
that._ScrollView.duration = 300;
but with no success... 

I am trying to implement infinite scroll view (for swiping between news articles). 
My Scroll view has 3 pages.  So, when user swipes from 2 -> 3 the content moves from 2 to 1, from 3 to 2, and the new article loads into the third page, and ScrollView scrolls to the second page again (without animation). 

2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 17 Jan 2013, 10:09 PM
Hello Vladimir,

The scrollTo method does not provide an option for disabling the animation, however this could be achieved by using internal methods. Here is the code:
var scrollView = $("#scrollview").data("kendoMobileScrollView");
scrollView.transition.moveTo({
    location: -4 * scrollView.dimension.getSize(),
    duration: 1,
    ease: kendo.fx.Transition.easeOutExpo
});
 
//where 4 is the page number

Please note that the page number should have a minus infront.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Vladimir
Top achievements
Rank 1
answered on 20 Jan 2013, 08:14 AM
Alexander, thank you
Tags
ScrollView (Mobile)
Asked by
Vladimir
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Vladimir
Top achievements
Rank 1
Share this question
or