Skip to content

Commit

Permalink
feat(design-land): update they way open is set for the design land si…
Browse files Browse the repository at this point in the history
…debar (#2837)
  • Loading branch information
xelaint committed Jun 7, 2024
1 parent a60d70c commit 91738c4
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ export class DesignLandSidebarViewportComponent {
public open = false;

constructor(private breakpoint: BreakpointObserver) {
this.open = this.breakpoint.isMatched(DaffBreakpoints.BIG_TABLET);
this.mode$ = this.breakpoint.observe(DaffBreakpoints.BIG_TABLET).pipe(
map((match) => match.matches ? DaffSidebarModeEnum.SideFixed : DaffSidebarModeEnum.Under),
map((match) => {
if (match.matches) {
this.open = true;
return DaffSidebarModeEnum.SideFixed;
} else {
this.open = false;
return DaffSidebarModeEnum.Over;
}
}),
);
}

Expand Down

0 comments on commit 91738c4

Please sign in to comment.