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

Is ng-golden-layout-root necessary? #47

Open
rcketscientist opened this issue Oct 24, 2019 · 2 comments
Open

Is ng-golden-layout-root necessary? #47

rcketscientist opened this issue Oct 24, 2019 · 2 comments

Comments

@rcketscientist
Copy link

rcketscientist commented Oct 24, 2019

template: `<div class="ng-golden-layout-root" #glroot></div>`

If you injected the root element in the constructor, wouldn't that avoid the extra ViewChild div and potentially some our styling dimension oddities?

@martin31821
Copy link
Member

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.

@rcketscientist
Copy link
Author

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:
image

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.

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

2 participants