diff --git a/projects/hslayers/common/filters/filters.component.ts b/projects/hslayers/common/filters/filters.component.ts index 47f78a3f41..086c036485 100644 --- a/projects/hslayers/common/filters/filters.component.ts +++ b/projects/hslayers/common/filters/filters.component.ts @@ -21,8 +21,8 @@ import {TranslateCustomPipe} from 'hslayers-ng/services/language'; ], }) export class HsFiltersComponent extends HsStylerPartBaseComponent { - @Input() rule: any; - @Input() set selectedLayer(layer: HsLayerDescriptor) { + @Input({required: true}) rule: any; + @Input({required: true}) set selectedLayer(layer: HsLayerDescriptor) { this.hsFiltersService.setSelectedLayer(layer); } diff --git a/projects/hslayers/components/styler/rule/rule.component.html b/projects/hslayers/components/styler/rule/rule.component.html index 2d2f74fa00..22d74e1414 100644 --- a/projects/hslayers/components/styler/rule/rule.component.html +++ b/projects/hslayers/components/styler/rule/rule.component.html @@ -19,10 +19,10 @@ @if (filtersVisible) { - + } @if (scalesVisible) { - + }
{{'STYLER.symbolizers' | translateHs }}:
@@ -53,13 +53,13 @@
@if (rule.symbolizers.length > 0) { - + } \ No newline at end of file diff --git a/projects/hslayers/components/styler/rule/rule.component.ts b/projects/hslayers/components/styler/rule/rule.component.ts index 4debc5f2f4..1a7b692e4b 100644 --- a/projects/hslayers/components/styler/rule/rule.component.ts +++ b/projects/hslayers/components/styler/rule/rule.component.ts @@ -1,8 +1,16 @@ import {CdkDragDrop, moveItemInArray} from '@angular/cdk/drag-drop'; -import {Component, EventEmitter, Input, Output, ViewChild} from '@angular/core'; +import { + Component, + EventEmitter, + Input, + Output, + ViewChild, + inject, +} from '@angular/core'; import {SymbolizerKind} from 'geostyler-style'; +import {HsLayerSelectorService} from 'hslayers-ng/services/layer-manager'; import {HsStylerPartBaseComponent} from 'hslayers-ng/services/styler'; import {HsStylerService} from 'hslayers-ng/services/styler'; import {Kinds} from '../symbolizers/symbolizer-kind.enum'; @@ -16,6 +24,9 @@ export class HsRuleComponent extends HsStylerPartBaseComponent { @Input() rule; @Output() changes = new EventEmitter(); @ViewChild('addSymMenu') menuRef; + + layerSelectorService = inject(HsLayerSelectorService); + filtersVisible = false; scalesVisible = false; constructor(public hsStylerService: HsStylerService) {