Fix interface labels are not persistant

This commit is contained in:
grossmj 2024-12-23 15:07:09 +07:00
parent ab84d1eea6
commit 27eb8eb9c3
No known key found for this signature in database
GPG Key ID: 1E7DD6DBB53FF3D7

View File

@ -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 {
@ -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) {