From c75dc4058fc7cad7edc65af5ac243b8ccad623bb Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Thu, 10 Apr 2014 20:06:05 +0200 Subject: [PATCH] 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. --- js/foundation/foundation.orbit.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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() { -- 2.47.2