]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Orbit: bullets: call `_prepare_direction` before `_goto` 4952/head
authorDaniel Hahler <git@thequod.de>
Thu, 10 Apr 2014 18:06:05 +0000 (20:06 +0200)
committerDaniel Hahler <git@thequod.de>
Thu, 10 Apr 2014 18:13:00 +0000 (20:13 +0200)
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

index a0272570f92ebf15f5a0615b533f63a1c1913148..67c8d2bd51c8ffd5b4062b7c8ec4c3013bce89e1 100644 (file)
         {
           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() {