From: Daniel Hahler Date: Thu, 10 Apr 2014 18:06:05 +0000 (+0200) Subject: Orbit: bullets: call `_prepare_direction` before `_goto` X-Git-Tag: v5.2.3~61^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4952%2Fhead;p=thirdparty%2Ffoundation%2Ffoundation-sites.git Orbit: bullets: call `_prepare_direction` before `_goto` This is in line with other calls to `_goto`, which call `_prepare_direction` before `_goto`. See commit e577378ae6d772988bfef5f245069be664642fc7. This fixes the animation when going to a previous slide. --- diff --git a/js/foundation/foundation.orbit.js b/js/foundation/foundation.orbit.js index a0272570f..67c8d2bd5 100644 --- a/js/foundation/foundation.orbit.js +++ b/js/foundation/foundation.orbit.js @@ -212,19 +212,22 @@ { var slide = container.find('[data-orbit-slide='+index+']'); if (slide.index() != -1) { + index = slide.index() + 1; + self._prepare_direction(index); setTimeout(function(){ - self._goto(slide.index() + 1); + self._goto(index); },100); } } else { + index = parseInt(index); + self._prepare_direction(index); setTimeout(function(){ - self._goto(parseInt(index)); + self._goto(index); },100); } } - } self.timer_callback = function() {