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

Question about StaticGrid:remove() #248

Open
Temeez opened this issue Oct 31, 2023 · 1 comment
Open

Question about StaticGrid:remove() #248

Temeez opened this issue Oct 31, 2023 · 1 comment
Assignees
Labels
documentation Update documentation
Milestone

Comments

@Temeez
Copy link

Temeez commented Oct 31, 2023

Is it expected that when using the StaticGrid remove method with a shift the actual gui nodes are moved? I was confused when I used remove without gui.delete_node(deleted_node) since it visually looks like it removes the node from gui, but after I figured out how to print the node tree it looks like it just moves the grid item on top of another one.

It would be good if the documentation tells what the shift policy does more precisely. I had always assumed that it only shifts the items in the nodes array.

Btw. I like druids quite a lot, thank you for making it! :)

@Insality
Copy link
Owner

Hello! As I remember - yes, the StaticGrid can manage nodes position and it's related to add/remove nodes too.

By default it's shift nodes to the Left, like usual table.remove do, but you can specify shift policy to None to don't move them on remove function

Thanks for suggestion, try to figure out how to describe all of this better

@Insality Insality self-assigned this Nov 28, 2023
@Insality Insality added the documentation Update documentation label Nov 28, 2023
@Insality Insality added this to the 0.12.0 milestone Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Update documentation
Projects
None yet
Development

No branches or pull requests

2 participants