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
Column removed after close a children #544
Comments
I found an example of a similar function: |
@wowoName Link doesn't work! |
@Abdullah0991 Please can you post an example. I am unable to replicate your issue. I have found some strange behavior but not what you have described. Please use the following codepen to replicate. I have copied your config over already. Also, which version of GoldenLayout are you using? |
@Abdullah0991 |
Ok, I will prepare an example. I use gl_v1.5.9 with ngx-golden-layout_v0.0.22 for my Angular 8.2 project. |
Hi, here is the codpen: I forked you pen and add a button which will add new component at column |
As I already mentioned in my repo, you have a column with a single child (=> a stack) and when you close the newly added component, it will normalize the whole state, which causes items (Rows/Columns) with only one child to be flattened out in order to save dom elements and achieve better performance. |
hmm, It's because of the normalization process. I will try your suggestions. |
In second step, how to move the child stack into the newly added column ? without remove and recreate again ? |
use |
It worked, but It cause another problem, the new added column will take new width (the layout will be divided equally between the root children). Is there another idea ? or is there a way to disable the normalization process for some time like (pause-resume) or disable it for specific child ? |
I updated the pen to see the problem, steps: you will see the layout will be divided equally, so |
Any suggestions? |
You must calculate the original width, there is no other option, I think. |
Thanks for your precious time. @ButchMonkey Is there a possibility to add new option to |
Or if you can tell me where the normalization process happens, maybe I can prepare a PR (with some help from you). |
According to: golden-layout/src/js/items/RowOrColumn.js Line 131 in 12ef17a
It gives me an idea to make the column undeletable:
Or even just change |
This method makes the column removed or maybe hidden when it dragged! Why? |
Need help, What's the proper method to change a component width/height? |
Hi, having a layout like this:
Current behavior
In my project, I add a new component as child in second column (bellow
third-component
) using id, after I close the new added component, the columnsec-col
get removed, and the componentthird-component
get added to root row.Expected behavior:
Column should stay as it already still has a child
third-component
.The text was updated successfully, but these errors were encountered: