Skip to content

Commit

Permalink
Fix interface labels are not persistant
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Dec 23, 2024
1 parent ab84d1e commit 27eb8eb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/services/mapsettings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ export class MapSettingsService {
} else {
localStorage.setItem('openReadme', 'false');
}

if (localStorage.getItem('showInterfaceLabels')) {
this.showInterfaceLabels = localStorage.getItem('showInterfaceLabels') === 'true' ? true : false;
} else {
localStorage.setItem('showInterfaceLabels', 'true');
}
}

public getSymbolScaling(): boolean {
Expand Down Expand Up @@ -78,6 +84,12 @@ export class MapSettingsService {

toggleShowInterfaceLabels(value: boolean) {
this.showInterfaceLabels = value;
localStorage.removeItem('showInterfaceLabels');
if (value) {
localStorage.setItem('showInterfaceLabels', 'true');
} else {
localStorage.setItem('showInterfaceLabels', 'false');
}
}

toggleIntegrateInterfaceLabels(value: boolean) {
Expand Down

0 comments on commit 27eb8eb

Please sign in to comment.