Skip to content

DockLayout out of screen children not visible any more in 5.0 #1594

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

Open
jrz opened this issue Nov 8, 2018 · 1 comment
Open

DockLayout out of screen children not visible any more in 5.0 #1594

jrz opened this issue Nov 8, 2018 · 1 comment
Assignees

Comments

@jrz
Copy link

jrz commented Nov 8, 2018

Just upgraded to 5.0 final.

My screen has several layouts stacked, and labels inside, but the labels that start ofscreen (scrollable) never become visible. They are available in the elements navigator in chrome. Also, if I add labels before, I can clearly see that the labels which are offscreen do not get rendered.

Is there any "smart" detection of wether something should be visible implemented in NS?

My screen is roughly:

<GridLayout>
  <ScrollView>
    <StackLayout orientation="vertical">
      <StackLayout *ngFor>
        <Label text="these remain visible" />
        <StackLayout orientation="vertical">
          <StackLayout orientation="vertical" *ngFor>
            <Label text="these also remain visible" />
            <StackLayout *ngIf>
              <DockLayout stretchLastChild="true">
                <Label dock="left" text="not visible when starting offscreen" />
                <Label dock="right" text="not visible when starting offscreen" />
                <Label text="not visible when starting offscreen" />
              </DockLayout>
              <Slider /> <!-- is visible -->

The problem seems to be the docklayout.
I've replaced it with FlexboxLayout, and it's fine.

@tsonevn
Copy link
Contributor

tsonevn commented Nov 28, 2018

Hi @jrz,
I have tested the described scenario with the latest tns-core modules and nativescript-angular, and the issue seems to be resolved. For your convenience, I am attaching a sample project. You can test it on your side and check if you will be able to recreate the issue.
Archive.zip

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

No branches or pull requests

3 participants