Skip to content

Commit

Permalink
Updated usage of sidebarOpened from the data service--in the data tab…
Browse files Browse the repository at this point in the history
…le component search button, and in the layer upgrade component sidebar done button
  • Loading branch information
iguannalin committed May 17, 2021
1 parent 9cbc6f0 commit 222d9dc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
6 changes: 3 additions & 3 deletions nav-app/src/app/data.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export class DataService {
public subtechniquesEnabled: boolean = true;
public versionChangelog?: VersionChangelog<Technique>;

private _sidebarOpened = true;
public get sidebarOpened(): boolean { return this._sidebarOpened };
public set sidebarOpened(newVal: boolean) { this._sidebarOpened = newVal };
private _sidebarOpened: boolean;
public get sidebarOpened(): boolean { return this._sidebarOpened; };
public set sidebarOpened(newVal: boolean) { this._sidebarOpened = newVal; };

/**
* Callback functions passed to this function will be called after data is loaded
Expand Down
2 changes: 1 addition & 1 deletion nav-app/src/app/datatable/data-table.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<div *ngIf="configService.getFeature('search')" class="control-row-item">

<div class="control-row-button dropdown noselect"
(click)="sidebarOpened = !sidebarOpened"
(click)="dataService.sidebarOpened = !dataService.sidebarOpened"
matTooltipPosition="below"
matTooltip="search">
<img src="assets/icons/ic_search_black_24px.svg"/>
Expand Down
3 changes: 0 additions & 3 deletions nav-app/src/app/datatable/data-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ export class DataTableComponent implements AfterViewInit {

currentDropdown: string = ""; //current dropdown menu

sidebarOpened = this.dataService.sidebarOpened;


//////////////////////////////////////////////////////////
// Stringifies the current view model into a json string//
// stores the string as a blob //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class LayerUpgradeComponent implements OnInit {

public upgradeLayer(): void {
// close sidebar
this.dataService.sidebarOpened = false;
this.dataService.sidebarOpened = !this.dataService.sidebarOpened;
}

public getIDs(object: Technique) {
Expand Down

0 comments on commit 222d9dc

Please sign in to comment.