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

Auto-repositionning? #795

Closed
metalheadz opened this issue Sep 29, 2017 · 7 comments
Closed

Auto-repositionning? #795

metalheadz opened this issue Sep 29, 2017 · 7 comments

Comments

@metalheadz
Copy link

Is there a way to auto reposition all the element after using the resize function without manually reposition each nodes? When I resize a node making it bigger in width, it always push the next node at the bottom even if theres enough space.

@DnJealt
Copy link

DnJealt commented Oct 2, 2017

Do you mean adding float: false to the Gridstack options?

@adumesny
Copy link
Member

adumesny commented Oct 3, 2017

I don't think that's what he means... http://gridstackjs.com/demo/two.html if you resize the first one and make it wider, it doesn't push the 2 more to the right to fit, it pushed # 2 down... I'm guessing he wants push right, then next row if doesn't fit... (grid on right has float on, but behaves same way here)

@metalheadz
Copy link
Author

metalheadz commented Oct 3, 2017

I found a way to do it... I remove all the nodes from the grid with removeall keeping them in the DOM... I after add manually each component using the autoposition parameters... Not so elegant... Would be nice if another option exists to do that... Pushing nodes at the bottom is very bad when you dont want to loose precious space

@adumesny
Copy link
Member

adumesny commented Oct 3, 2017

you want a left-right gravity, where right now it's a top only gravity - there has been suggestion to support multiple style by others (and @radiolips mention this might make it in 1.0 release but I wouldn't bank on it).

@metalheadz
Copy link
Author

I want a mix of the 2 in fact, when theres not enough space at the right, its ok to push the node at the bottom, begining at the left again.

@radiolips
Copy link
Member

Oddly enough, #796 requests that exact feature.

@radiolips
Copy link
Member

I'm closing this in favor of #796, but please watch 796 if you'd like to keep in the loop.

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

No branches or pull requests

4 participants