2013-04-10 55 views
0

反正有停止Scroller?例如,我想允許用戶在觸摸按鈕時返回到特定位置。我的做法迄今:Kendo UI Mobile - 停止Scroller

// scroll to the top 
e.view.scroller.reset(); 

// scroll to the destination offset 
e.view.scroller.scrollTo(0, targetOffset); 

的問題是,如果滾動先前滾動,它會繼續targetOffset後滾動,直到其速度爲0

有人能幫助我的方法首先停止滾動的速度?

我使用JQuery 1.9.1和劍道移動的2013年第一季度發佈

回答

2

雖然沒有從他們的文檔暴露,我被這裏的速度屬性設置爲0解決了這個問題:

e.view.scroller.yinertia.velocity = 0; 
+0

這應該被標記爲答案 – 2014-11-23 23:40:24