Skip to content

Allow fixed height grid #129

@julian-christl

Description

@julian-christl

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 (#4 (comment)); 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions