]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
use outerHeight() instead of height() 6177/head
authorAlfred Bez <alfred.bez@googlemail.com>
Wed, 7 Jan 2015 09:07:13 +0000 (10:07 +0100)
committerAlfred Bez <alfred.bez@googlemail.com>
Wed, 7 Jan 2015 09:07:13 +0000 (10:07 +0100)
I had some slides with an 1px-border and there were 2px missing on the container.

js/foundation/foundation.orbit.js

index 8a811abbbbe26370ca0f19b48ffe096a137914ac..f2dd30586f6105106ddfb64bd7ebf598c95b4b3d 100644 (file)
           slides_container.trigger('after-slide-change.fndtn.orbit',[{slide_number: idx, total_slides: slides.length}]);
           settings.after_slide_change(idx, slides.length);
         };
-        if (slides_container.height() != next.height() && settings.variable_height) {
-          slides_container.animate({'height': next.height()}, 250, 'linear', unlock);
+        if (slides_container.outerHeight() != next.outerHeight() && settings.variable_height) {
+          slides_container.animate({'height': next.outerHeight()}, 250, 'linear', unlock);
         } else {
           unlock();
         }
         if (dir === 'prev') {animate.prev(current, next, callback);}
       };
 
-      if (next.height() > slides_container.height() && settings.variable_height) {
-        slides_container.animate({'height': next.height()}, 250, 'linear', start_animation);
+      if (next.outerHeight() > slides_container.outerHeight() && settings.variable_height) {
+        slides_container.animate({'height': next.outerHeight()}, 250, 'linear', start_animation);
       } else {
         start_animation();
       }
 
     self.compute_dimensions = function() {
       var current = $(self.slides().get(idx));
-      var h = current.height();
+      var h = current.outerHeight();
       if (!settings.variable_height) {
         self.slides().each(function(){
-          if ($(this).height() > h) { h = $(this).height(); }
+          if ($(this).outerHeight() > h) { h = $(this).outerHeight(); }
         });
       }
       slides_container.height(h);