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

How to auto arrange nested items in grid after resizing the container of the nested items? #814

Closed
nissimpradhan opened this issue Nov 9, 2017 · 1 comment

Comments

@nissimpradhan
Copy link

Type of Issue

[ ] Bug
[ ] Feature Request
[ X ] Question

Subject of the issue

Is it possible to manually trigger re calculation of item position? (similar to when dragging an item, and other items make way for the item being dragged)

I am working on nested grids and I have successfully managed to correct the number of columns in a nested grid, if the nested grid's container's size was changed. But then it leaves the nested items in a weird state. I was wondering if there was a way to trigger manual re positioning of items in the grid.

Your environment

GridStack 0.3.0
Google Chrome
Version 61.0.3163.100 (Official Build) (64-bit)

Steps to reproduce

Preview the issue at codepen.
https://codepen.io/nissim/pen/bYgjvb

Expected behaviour

I know that auto positioning is not the expected behavior but I would like to find out how tp.

Actual behaviour

  • Item disappears from visible area, if container resized to too small.
  • Item overlaps
  • If after resizing, item it moved then position is adjusted correctly.
  • If resized back to original size, all elements appear
@adumesny
Copy link
Member

adumesny commented Dec 21, 2019

I know this is late... but this should now be possible with the fix I made in #1098 (and following 3 checkins). you can now call setColumn(n) and have the children relayout correctly to a new number of columns.

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

3 participants