mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(scrollView): higher velocity threshold for sliding
This commit is contained in:
@@ -328,6 +328,12 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
/** duration for animations triggered by scrollTo/zoomTo */
|
||||
animationDuration: 250,
|
||||
|
||||
/** The velocity required to make the scroll view "slide" after touchend */
|
||||
decelVelocityThreshold: 4,
|
||||
|
||||
/** The velocity required to make the scroll view "slide" after touchend when using paging */
|
||||
decelVelocityThresholdPaging: 4,
|
||||
|
||||
/** Enable bouncing (content can be slowly moved outside and jumps back after releasing) */
|
||||
bouncing: true,
|
||||
|
||||
@@ -1965,7 +1971,7 @@ ionic.views.Scroll = ionic.views.View.inherit({
|
||||
self.__decelerationVelocityY = movedTop / timeOffset * (1000 / 60);
|
||||
|
||||
// How much velocity is required to start the deceleration
|
||||
var minVelocityToStartDeceleration = self.options.paging || self.options.snapping ? 4 : 1;
|
||||
var minVelocityToStartDeceleration = self.options.paging || self.options.snapping ? self.options.decelVelocityThresholdPaging : self.options.decelVelocityThreshold;
|
||||
|
||||
// Verify that we have enough velocity to start deceleration
|
||||
if (Math.abs(self.__decelerationVelocityX) > minVelocityToStartDeceleration || Math.abs(self.__decelerationVelocityY) > minVelocityToStartDeceleration) {
|
||||
|
||||
Reference in New Issue
Block a user