Skip to content

Commit

Permalink
Merge pull request #1532 from GNS3/bugfix/1435
Browse files Browse the repository at this point in the history
Fix interface labels are not persistant
  • Loading branch information
grossmj authored Dec 23, 2024
2 parents ab84d1e + 27eb8eb commit 180c653
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 180c653

Please sign in to comment.