amend(slideBox): when changing by >=2 slides, transition correctly

This commit is contained in:
Andrew
2014-12-01 13:10:56 -07:00
parent a49e577db8
commit cc7a6fd44c

View File

@@ -236,7 +236,7 @@ function(scope, element, $log, $document, $$q, $timeout, $interval, $$ionicAttac
var deferred = $$q.defer();
var delta = getDelta(selectedIndex, newIndex);
var width = slideNodes[newIndex].offsetWidth;
var width = (slideNodes[selectedIndex] || slideNodes[newIndex] || {}).offsetWidth || 0;
var direction;
var translatePx;