Change visibility type for panel hiding (#864)

* change visibility method for panels

* make the new visibility type opt in
This commit is contained in:
Anthony Dresser
2018-03-09 14:54:13 -08:00
committed by GitHub
parent bc4b399f87
commit fab4185c1f
6 changed files with 11 additions and 6 deletions

View File

@@ -5,7 +5,7 @@
*--------------------------------------------------------------------------------------------*/
-->
<panel class="dashboard-panel" (onTabChange)="handleTabChange($event)" (onTabClose)="handleTabClose($event)" [actions]="panelActions">
<tab *ngFor="let tab of tabs" [title]="tab.title" class="fullsize" [identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions">
<tab [visibilityType]="'visibility'" *ngFor="let tab of tabs" [title]="tab.title" class="fullsize" [identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions">
<dashboard-home-container *ngIf="tab.id === 'homeTab'; else not_home" [properties]="propertiesWidget" [tab]="tab">
</dashboard-home-container>
<ng-template #not_home>

View File

@@ -5,7 +5,7 @@
*--------------------------------------------------------------------------------------------*/
-->
<panel [options]="panelOpt" style="flex: 1 1 auto;" class="dashboard-panel" (onTabChange)="handleTabChange($event)">
<tab *ngFor="let tab of tabs" [title]="tab.title" class="fullsize" [identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions">
<tab [visibilityType]="'visibility'" *ngFor="let tab of tabs" [title]="tab.title" class="fullsize" [identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions">
<dashboard-webview-container *ngIf="getContentType(tab) === 'webview-container'" [tab]="tab">
</dashboard-webview-container>
<dashboard-widget-container *ngIf="getContentType(tab) === 'widgets-container'" [tab]="tab">

View File

@@ -48,7 +48,7 @@ export class WebviewContent implements OnInit, IDashboardWebview {
}
public layout(): void {
this._createWebview();
this._webview.layout();
}
public get id(): string {

View File

@@ -80,7 +80,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
}
public layout(): void {
this._createWebview();
this._webview.layout();
}
public sendMessage(message: string): void {