-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Min height fix #775
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
Min height fix #775
Conversation
Testing:
1. run two.html and check that yellow grid has height of 300px
2. modify two.html to have
#grid1 {
background: lightgoldenrodyellow;
min-height: 300px;
}
3. rerun and notice grid1 now has 380px actual height (passed last item) !
4. adding removing items will shrink grow, but not to the correct min 300px size.
Testing:
1. run two.html and check that yellow grid has height of 300px
2. modify two.html to have
#grid1 {
background: lightgoldenrodyellow;
min-height: 300px;
}
3. rerun and notice grid1 now has 380px actual height (passed last item) !
4. adding removing items will shrink grow, but not to the correct min 300px size.
… minHeight_fix # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/gridstack/gridstack.js.git" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added an explicit lint (makes it easier to check before commit) as for some reason it's not auto linting in Visual Studio code yet...
| var minHeight = parseInt(this.container.css('min-height')) / this.cellHeight(); | ||
| if (height < minHeight) { | ||
| height = minHeight; | ||
| // check for css min height. Each row is cellHeight + verticalMargin, until last one which has no margin below |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
real change - ignore the /dist files as they will be removed yet (merge hell)
use verticalMargin when calculating min height in rows
Testing:
#grid1 {
background: lightgoldenrodyellow;
min-height: 300px;
}