nativescript-community / ui-drawer

NativeScript plugin that allows you to easily add a side drawer (side menu) to your projects.
https://nativescript-community.github.io/ui-drawer/
Apache License 2.0
24 stars 12 forks source link

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

Open sublime392 opened 1 year ago

sublime392 commented 1 year ago

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.

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();
            }
          });
        });
      }
    });