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

Size grid based on content #292

Closed
CollinGraf314 opened this issue Apr 5, 2018 · 3 comments
Closed

Size grid based on content #292

CollinGraf314 opened this issue Apr 5, 2018 · 3 comments
Milestone

Comments

@CollinGraf314
Copy link
Collaborator

Enhancement Request: Create an option that allows the gridster element's height to be determined by it's content, given that the gridType is either 'fixed', 'vertical fixed', or 'horizontal fixed'.

In my case, I would like to allow the elements in my 'vertical fixed' grid to fill a space larger than the current screen size without creating multiple scroll-bars or defining a massive space for it to begin with.

If there is any known work around for getting this functionality, please let me know.

@tiberiuzuld
Copy link
Owner

Hi @CollinGraf314 ,
It's not possible because the elements are positioned absolute.
And because how position absolute works there is not possible for the grid element to increase in size automatically by the browser.

A workaround for now is to:
There is the option to determine the grid size on each itemChangeCallback, check the number of rows the grid and multiply by the fixed height, add margins and set the size on the grid.

Maybe in the future will add this option in the library.
Need to think about it.

@CollinGraf314
Copy link
Collaborator Author

CollinGraf314 commented Apr 6, 2018

Thanks for responding so fast and thanks for the work around!

@tiberiuzuld
Copy link
Owner

Added in v5.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants