Skip to content
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

What about fixed height ktd-grid and resize within each item? #1

Closed
irustm opened this issue Feb 3, 2021 · 5 comments
Closed

What about fixed height ktd-grid and resize within each item? #1

irustm opened this issue Feb 3, 2021 · 5 comments
Labels
feature New feature

Comments

@irustm
Copy link

irustm commented Feb 3, 2021

Like Grid Types= fit in gridster https://tiberiuzuld.github.io/angular-gridster2/gridTypes?

@llorenspujol
Copy link
Contributor

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

@irustm
Copy link
Author

irustm commented Feb 3, 2021

rowHeight = 'fit' Looks good)

@llorenspujol llorenspujol added the feature New feature label Feb 4, 2021
@andrewpolemeni
Copy link

andrewpolemeni commented Jan 14, 2022

@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?

@llorenspujol
Copy link
Contributor

@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.

@andrewpolemeni
Copy link

andrewpolemeni commented Jan 18, 2022

@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.

llorenspujol added a commit to llorenspujol/angular-grid-layout that referenced this issue Feb 4, 2022
llorenspujol pushed a commit to llorenspujol/angular-grid-layout that referenced this issue Feb 4, 2022
chore(npm): Updating package name and adding index.ts on lib root

fix: add minH minW calculation correction

fix: minor fix

refactor: pruned react-grid-layout properties, added minH etc on real life examples (katoid#1)
llorenspujol added a commit to llorenspujol/angular-grid-layout that referenced this issue Jan 3, 2023
llorenspujol added a commit to llorenspujol/angular-grid-layout that referenced this issue Jan 3, 2023
llorenspujol added a commit to llorenspujol/angular-grid-layout that referenced this issue Jan 3, 2023
llorenspujol added a commit to llorenspujol/angular-grid-layout that referenced this issue Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

3 participants