Skip to content
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

fix unnecessary horizontal scroll when the table has sub pixel width #1051

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

a-poptsov
Copy link

No description provided.

@6pac
Copy link

6pac commented Feb 19, 2015

sorry, could you leave a very short summary of how to reproduce the problem ?

@a-poptsov
Copy link
Author

Sure.
The environment is: windows 7, google chrome 40

We are using bootstrap3:

<div class="row">
     <div class="col-lg-10 col-lg-offset-1">
        //slickgrid
     </div>
</div>

And sometimes (depends on screen resolution and browser width) the availWidth variable has value, that is not natural number (1426.6666... for example). In this case the sum of columns width can be (depends on number of columns) bigger then availWidth after running of autosizeColumns function. In this case we get horizontal scroll that is not expected.
From "point of view of source" we have this bug when for each column
Math.min(Math.floor(growProportion * c.width) - c.width, (c.maxWidth - c.width) || 1000000)
equals 0. In this case width of every column will be increased by 1.

After my fix column width will not be increased if total width is bigger then availWidth

@6pac
Copy link

6pac commented Feb 20, 2015

thanks!

@6pac
Copy link

6pac commented Mar 13, 2015

This has been integrated into my 'alternative master'. Any testing is appreciated. See #1055

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants