ng6-golden-layout
ng6-golden-layout copied to clipboard
Is ng-golden-layout-root necessary?
https://github.com/EmbeddedEnterprises/ng6-golden-layout/blob/789bef6e31c9dbe6c4b93ca2730c659aeb1328b6/projects/ngx-golden-layout/src/lib/golden-layout.component.ts#L292
If you injected the root element in the constructor, wouldn't that avoid the extra ViewChild div and potentially some our styling dimension oddities?
Can you elaborate on the styling issues? The div should be transparent to all outer styles, but after a quick look, I think we can avoid it.
There are some odd interactions with flex. Under certain circumstances GL won't recognize its parent's dimensions. We discussed those a while back.
We also just found a case where window content can blow up the entire golden layout. The following code snippet "fixed" that.
.ng-golden-layout-root {
flex: 1 1 auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
Basically to match parent so we can't cause oddities like this:

The above image is a GL window, but the content itself managed to push the entire GL outside of the parent bounds (can't see tabs, etc.)
This came from another group and I haven't had time to dig into how they did that at the moment, but removing the extra layer of abstraction can only help.