New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1000px width div target #74

Closed
sjanofsky opened this Issue May 31, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@sjanofsky

sjanofsky commented May 31, 2012

When the target is a 1000px wide div, the browser shows a horizontal scroll bar when spin() is called. If the div width is < 1000px, then the horizontal scroll bar is not shown.

Is there something in the spin code that is sizing a hidden div or frame or something?

@riddla

This comment has been minimized.

Show comment
Hide comment
@riddla

riddla Jun 6, 2012

The following hotfix worked for me:

// sets the width of the spin element according to the generated canvas elements
var spin_element = $('.spinner');
if (spin_element.length) {
    total_width = 0;
    spin_element.find('div').each(function() {
        total_width += $(this).outerWidth();
    });
    spin_element.css('width', total_width);
}

(Probably needs some refinement / check for canvas element existence etc.)

riddla commented Jun 6, 2012

The following hotfix worked for me:

// sets the width of the spin element according to the generated canvas elements
var spin_element = $('.spinner');
if (spin_element.length) {
    total_width = 0;
    spin_element.find('div').each(function() {
        total_width += $(this).outerWidth();
    });
    spin_element.css('width', total_width);
}

(Probably needs some refinement / check for canvas element existence etc.)

@sjanofsky

This comment has been minimized.

Show comment
Hide comment
@sjanofsky

sjanofsky Jun 6, 2012

Worked perfectly... thanks!

On Wed, Jun 6, 2012 at 9:13 AM, riddla wrote:

The following hotfix worked for me:

// sets the width of the spin element according to the generated 
canvas elements
var spin_element = $('.spinner');
if (spin_element.length) {
  total_width = 0;
  spin_element.find('div').each(function() {
      total_width += $(this).outerWidth();
  });
  spin_element.css('width', total_width);
}

(Probably needs some refinement / check for canvas element existence
etc.)


Reply to this email directly or view it on GitHub:
#74 (comment)

sjanofsky commented Jun 6, 2012

Worked perfectly... thanks!

On Wed, Jun 6, 2012 at 9:13 AM, riddla wrote:

The following hotfix worked for me:

// sets the width of the spin element according to the generated 
canvas elements
var spin_element = $('.spinner');
if (spin_element.length) {
  total_width = 0;
  spin_element.find('div').each(function() {
      total_width += $(this).outerWidth();
  });
  spin_element.css('width', total_width);
}

(Probably needs some refinement / check for canvas element existence
etc.)


Reply to this email directly or view it on GitHub:
#74 (comment)

@fgnass fgnass closed this in e3d09ff Aug 10, 2012

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