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

Docking: Trying to avoid an empty central node #3168

Open
franciscod opened this issue Apr 27, 2020 · 1 comment
Open

Docking: Trying to avoid an empty central node #3168

franciscod opened this issue Apr 27, 2020 · 1 comment
Labels

Comments

@franciscod
Copy link
Contributor

franciscod commented Apr 27, 2020

Version: 1.77 WIP @ 7ddc1ad
Branch: docking
Back-ends: imgui_impl_sdl_gl3.cpp
OS: Linux

I would like to not have an empty central node if there's other node adjacent to it. Instead when removing the last window docked into the central node, the closest dock node should fill the available space, and turn into the new central node.

Is there anything to be aware of before attempting to add this functionality?

I see ImGuiDockNodeFlags_NoCentralNode is commented since the line was introduced, so maybe there's a reason for that.


DockContextProcessUndockNode has this in a comment:

// In the case of a root node or central node, the node will have to stay in place. 

Comment before ImGui::DockSpace's code:

// The Central Node is always displayed even when empty and shrink/extend according to the requested size of its neighbors.
@franciscod franciscod changed the title ImGuiDockNodeFlags_NoCentralNode [docking] Trying to avoid an empty central node Apr 27, 2020
@ocornut ocornut changed the title [docking] Trying to avoid an empty central node Docking: Trying to avoid an empty central node Apr 27, 2020
@ocornut
Copy link
Owner

ocornut commented Sep 8, 2021

I believe this is same as #4334 so linking them together

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

No branches or pull requests

2 participants