angular-grid-layout
angular-grid-layout copied to clipboard
Allow fixed height grid
Hey there, first of all, thanks a lot for the library!
My use case is simple: I need a fixed-sized grid to move things around. The issue: the grid isn't fixed size but extends infinitely on the y-axis. It has been mentioned here that this was an intentional design decision (https://github.com/katoid/angular-grid-layout/issues/4#issuecomment-775005209); however, I think it would be pretty easy (famous last words) to allow both:
I'd suggest adding an optional rows parameter, thus making it backwards-compatible.
- If the parameter is not set, everything behaves as usual.
- If the parameter is set and the row height is numerical (this grid height is not set), the height is limited by
rows * (rowHeight + gap) - gap - If the parameter is set and the row height is
'fit'(this the grid height is set), the height is already limited and the rowHeight will be calculated
I don't see any drawback, it doesn't restrict usage and enables more use cases.
If you (the maintainer) don't have any capacity, I will take a look myself, but I need a go first, of course, to ensure the PR will be merged if implemented.