Reputation: 14289
I was racking my brain trying the get the .gridster-mobile
class to preserve the height. It currently disregards min_size[0]
when in mobile due to the height being set to empty string.
I had a temporary fix where I just set all the heights with a media query:
@media (max-width: 500px) {
.gridster-item{
height:120px !important;
}
}
and this is the gridster settings:
isMobile: false, // stacks the grid items if true
mobileBreakPoint: 600, // if the screen is not wider that this, remove the grid layout and stack the items
mobileModeEnabled: true,
How to preserve the row height when in mobile mode?
Upvotes: 0
Views: 1076
Reputation: 14289
I posted this question because I did not find the answer, which is this less-documented configuration setting:
saveGridItemCalculatedHeightInMobile:true
this should save you some headache. In the example config, this is way down the list away from the other mobile settings, so it's easy to overlook.
Upvotes: 3