vue-grid-layout
vue-grid-layout copied to clipboard
GridItem element's height value seems not equal to (rowHeight * GridItem.h)
In my case, rowHeight is 15 and GridItem props h is 15, but the rendered element's height is 365px ? Normally it should be 15 * 15 = 225px, right ?
From issue #73, I find an example.
I found a formula
newH = Math.ceil((clientHeight + marginY) / (rowHeight + marginY))
OK, this formula can answer why the rendered element's height is 365px ...
But why should marginY be calculated together?
thanks 0.0
Same problem. I found it weird.
同样的问题。我发现它很奇怪。其实真实高度是(row-height)*item.y +marginY * (item.y-1)
HI, Has it been resolved?
HI, Has it been resolved?
One solution is to set the margin to [x, 0], so there will be no deviation in clientHeight. You can simulate the margin within the griditem.