Skip to content

Commit

Permalink
fix: Disable 'Save current map' button when Save map panel is not ena…
Browse files Browse the repository at this point in the history
…bled
  • Loading branch information
FilipLeitner authored and jmacura committed Feb 13, 2024
1 parent 1a5a394 commit 20de4a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
*ngIf="isVisible$ | async">
<div class="hs-compositions-header" *ngIf="{layman: hsCommonLaymanService.layman$ | async } as ctx">
<hs-panel-header name="compositions" [panelTabs]="'COMPOSITIONS'">
<button mainButton class="btn btn-sm btn-outline-primary border-0 align-items-center d-flex gap-2"
<button mainButton [disabled]="!hsConfig.panelsEnabled['saveMap']"
class="btn btn-sm btn-outline-primary border-0 align-items-center d-flex gap-2"
(click)="openSaveMapPanel()"> {{'PANEL_HEADER.SAVECOMPOSITION' | translateHs}}
<i class="glyphicon icon-save-floppy"></i>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {HsCompositionsMapService} from './compositions-map.service';
import {HsCompositionsOverwriteDialogComponent} from './dialogs/overwrite-dialog.component';
import {HsCompositionsParserService} from 'hslayers-ng/shared/compositions';
import {HsCompositionsService} from './compositions.service';
import {HsConfig} from 'hslayers-ng/config';
import {HsDialogContainerService} from 'hslayers-ng/common/dialogs';
import {HsLanguageService} from 'hslayers-ng/shared/language';
import {HsLayoutService} from 'hslayers-ng/shared/layout';
Expand Down Expand Up @@ -34,6 +35,7 @@ export class HsCompositionsComponent
name = 'compositions';

constructor(
public hsConfig: HsConfig,
private hsCompositionsService: HsCompositionsService,
private hsCompositionsParserService: HsCompositionsParserService,
public hsLayoutService: HsLayoutService,
Expand Down

0 comments on commit 20de4a7

Please sign in to comment.