Skip to content

Commit

Permalink
Backport: 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 608fcfd commit ee5b88e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app/services/mapsettings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export class MapSettingsService {
} else {
localStorage.setItem('symbolScaling', 'true');
}
if (localStorage.getItem('showInterfaceLabels')) {
this.showInterfaceLabels = localStorage.getItem('showInterfaceLabels') === 'true' ? true : false;
} else {
localStorage.setItem('showInterfaceLabels', 'true');
}
}

public getSymbolScaling(): boolean {
Expand Down Expand Up @@ -72,6 +77,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 ee5b88e

Please sign in to comment.