angular-grid-layout
angular-grid-layout copied to clipboard
What about fixed height ktd-grid and resize within each item?
Like Grid Types
= fit
in gridster https://tiberiuzuld.github.io/angular-gridster2/gridTypes?
It's a good feature, simple to add and aligned with the project philosophy. Said that, in this grid solution there is no 'grid type', there are just cols
and rowHeight
. Cols fit by default, because is a relative value, but not rowHeight
.
We should maybe allow the user to put another value in rowHeight
that are not CSS pixels, for example rowHeight = 'fit'
. This would work and would make the grid layout fit in it's space. There is also the possibility to make rowHeight
optional and if not provided just fit, but I am more with the first one.
What are your thoughts? @irustm
rowHeight = 'fit'
Looks good)
@llorenspujol I was taking a look into this library and rowHeight = 'fit' is a requirement since our layout uses css grid. It would be really helpful and a great feature if you implemented this since other libraries don't have this. Just curious what exactly it would take to implement this feature?
@andrewpolemeni The feature itself doesn't require much changes in the code, since it just changes how the rowHeight is calculated. Said that, I tested it a little bit, and I find it a little confusing compared to the current grid purpose.
I would like to know your exact use case, do you expect rowHeight = 'fit'
to work equal like gridster2 Grid Types= fit
? You can test it here: https://tiberiuzuld.github.io/angular-gridster2/gridTypes
Right now with the small test I did, it does so, works like in gridster2. But as I said, I found it a bit of an edge case. The fact that a grid item rezise or move can make all other grid items to change its size is a strange behavior IMO. So, would be nice to know your use case more detailed, and see if rowHeight = 'fit'
can be finally included and how.
@llorenspujol It's basically the default behavior of css grid. When it builds the grid, it takes the item where the row = 1.. whatever item is at 1 row height and is the largest item in the grid, that's the default height of every row so if we have an item with row = 2, it would be double that largest item that is set to 1.
Requirements:
- No defined heights since we want ccs grid to determine that for us.
- Also being able to constrain it to a certain column count (that way the grid height doesn't change). Would be great to make this optional to set the column count or else it goes to default behavior.