Small adjustment on the layout mode setting

This commit is contained in:
Sercan Yemen 2017-10-24 11:02:40 +03:00
parent fe8b44b14c
commit b7cb09b087
2 changed files with 8 additions and 8 deletions

View File

@ -6,12 +6,6 @@ fuse-main {
width: 100%; width: 100%;
height: 100%; height: 100%;
&.boxed {
max-width: 1200px;
margin: 0 auto;
@include mat-elevation(8);
}
> .mat-sidenav-container { > .mat-sidenav-container {
display: flex; display: flex;
flex: 1; flex: 1;
@ -72,4 +66,10 @@ fuse-main {
} }
} }
} }
&[fuse-layout-mode="boxed"] {
max-width: 1200px;
margin: 0 auto;
@include mat-elevation(8);
}
} }

View File

@ -14,7 +14,7 @@ export class FuseMainComponent implements OnInit, OnDestroy
{ {
onSettingsChanged: Subscription; onSettingsChanged: Subscription;
fuseSettings: any; fuseSettings: any;
@HostBinding('class.boxed') boxed; @HostBinding('attr.fuse-layout-mode') layoutMode;
constructor( constructor(
private _renderer: Renderer2, private _renderer: Renderer2,
@ -29,7 +29,7 @@ export class FuseMainComponent implements OnInit, OnDestroy
.subscribe( .subscribe(
(newSettings) => { (newSettings) => {
this.fuseSettings = newSettings; this.fuseSettings = newSettings;
this.boxed = this.fuseSettings.layout.mode === 'boxed'; this.layoutMode = this.fuseSettings.layout.mode;
} }
); );