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

Drawer sticks out a bit when rotating from portrait to landscape #18

Open
sublime392 opened this issue Oct 28, 2022 · 0 comments
Open

Comments

@sublime392
Copy link

sublime392 commented Oct 28, 2022

Which platform(s) does your issue occur on?

Witnessed on iOS (using Angular); assuming others affected the same, but not sure.

@nativescript/iOS 8.3.3
@nativescript/angular 14.2.5

Please, tell us how to recreate the issue in as much detail as possible.

  • Have app with left side drawer.
  • Launch app.
  • The drawer needs to be opened and closed at least once before rotating to landscape. I open/close with toggle() if that matters.
  • Rotate to landscape. The drawer sticks out part way.

As a workaround, I did the following. It isn't exactly ready to pop into a PR, or I would, but concept is to toggle the drawer after rotation so it jives with new layout dims:

orientationService.getLandscapeSubject().pipe(
      distinctUntilChanged(),
     
    ).subscribe({
      next: val => {
        this._drawer?.toggle().then(() => {
          timer(200).subscribe({
            next: () => {
              this._drawer?.toggle();
            }
          });
        });
      }
    });
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

1 participant