Skip to content

Conversation

@adumesny
Copy link
Member

use verticalMargin when calculating min height in rows

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.

Alain Dumesny and others added 5 commits September 11, 2017 17:08
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.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 69.399% when pulling 123cc01 on adumesny:minHeight_fix into dfc9b42 on gridstack:develop.

"repository": {
"type": "git",
"url": "git+https://github.com/gridstack/gridstack.js.git"
},
Copy link
Member Author

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
Copy link
Member Author

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)

@radiolips radiolips merged commit ff31cb7 into gridstack:develop Sep 13, 2017
@adumesny
Copy link
Member Author

introduced by #767
fixes #628

@adumesny adumesny deleted the minHeight_fix branch September 13, 2017 19:58
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.

3 participants