chore(slideBox): make it easier to scroll vertically

Addresses #2317
This commit is contained in:
Andrew
2014-10-09 10:27:18 -06:00
parent 950d697a70
commit 9642c4a30b
2 changed files with 3 additions and 2 deletions

View File

@@ -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);