mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
3
js/angular/controller/slideBoxController.js
vendored
3
js/angular/controller/slideBoxController.js
vendored
@@ -207,8 +207,9 @@ function(scope, element, $$ionicAttachDrag, $interval) {
|
||||
|
||||
// Select a new slide if it's avaiable
|
||||
if (self.isInRange(nextIndex)) {
|
||||
var distanceRemaining = (1 - Math.abs(percent)) * slidesParent.prop('offsetWidth');
|
||||
var transitionDuration = Math.min(
|
||||
slidesParent.prop('offsetWidth') / (velocity),
|
||||
distanceRemaining / velocity,
|
||||
SLIDE_TRANSITION_DURATION
|
||||
);
|
||||
self.select(nextIndex, transitionDuration);
|
||||
|
||||
Reference in New Issue
Block a user