Orbit height - variable vs tallest content #3000

Closed
intuitart opened this Issue Aug 12, 2013 · 3 comments

Comments

Projects
None yet
4 participants
@intuitart

It is my understanding that Orbit 4.3.1 is intended to have a fixed height equal to the height of the tallest content by default. Then by setting variable_height to true it should adjust the height for each slide.

What is happening, however, is that the first slide takes the height of the tallest content and from there on the height adjusts for each slide.

By adding the test for variable_height in a couple of places in the JS, it works the way I believe it is intended.

The followiong applies to foundation.orbit.js version 4.3.1 downloaded from the website:

At line 107, replace
if (slides_container.height() != next.height()) {
with
if (slides_container.height() != next.height() && settings.variable_height) {

At line 121, replace
if (next.height() > slides_container.height()) {
with
if (next.height() > slides_container.height() && settings.variable_height) {

Hope this helps,

Andrew P.

@jamiefolsom

This comment has been minimized.

Show comment
Hide comment
@jamiefolsom

jamiefolsom Aug 13, 2013

Hi @intuitart,

Thanks for the hint on this. I've made those changes, and added some console logging, and in my case, those lines are never reached.

Line 161, compute_dimensions appears to be where the action is:

    self.compute_dimensions = function() {
      var current = $(slides_container.children().get(idx));
      var h = current.height();
      if (!settings.variable_height) {
        slides_container.children().each(function(){
          if ($(this).height() > h) { h = $(this).height(); }
        });
      }
      slides_container.height(h);
    };

There's an open issue assigned to @mhayes I believe: #402.

Best,

Jamie

Hi @intuitart,

Thanks for the hint on this. I've made those changes, and added some console logging, and in my case, those lines are never reached.

Line 161, compute_dimensions appears to be where the action is:

    self.compute_dimensions = function() {
      var current = $(slides_container.children().get(idx));
      var h = current.height();
      if (!settings.variable_height) {
        slides_container.children().each(function(){
          if ($(this).height() > h) { h = $(this).height(); }
        });
      }
      slides_container.height(h);
    };

There's an open issue assigned to @mhayes I believe: #402.

Best,

Jamie

@loicdelon

This comment has been minimized.

Show comment
Hide comment
@loicdelon

loicdelon Aug 14, 2013

Hi,

I've met this problem : "the first slide takes the height of the tallest content and from there on the height adjusts for each slide."

The code given by intuitart (lines 107 and 121) fixed this bug.

Best regards

Loïc

Hi,

I've met this problem : "the first slide takes the height of the tallest content and from there on the height adjusts for each slide."

The code given by intuitart (lines 107 and 121) fixed this bug.

Best regards

Loïc

@mhayes

This comment has been minimized.

Show comment
Hide comment
@mhayes

mhayes Aug 14, 2013

Contributor

I just pushed out the fix mentioned by @intuitart. This will be part of the next point release of Foundation. Thanks guys!

Contributor

mhayes commented Aug 14, 2013

I just pushed out the fix mentioned by @intuitart. This will be part of the next point release of Foundation. Thanks guys!

@mhayes mhayes closed this Aug 14, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment