diff --git a/projects/hslayers/assets/locales/cs.json b/projects/hslayers/assets/locales/cs.json index 6c82001764..1819238d98 100644 --- a/projects/hslayers/assets/locales/cs.json +++ b/projects/hslayers/assets/locales/cs.json @@ -831,7 +831,7 @@ }, "reallyDelete": "Opravdu smazat tento prvek?", "reallyDeleteAllFeaturesFrom": "Opravdu odstranit všechny prvky z vrstvy {0}?", - "reallyDeleteAllSelectedLayers": "Opravdu odstranit všechny vybrané prvky?", + "reallyDeleteAllSelectedLayers": "Opravdu chcete odstranit všechny odstranitelné vybrané prvky?", "untitledFeature": "Prvek bez názvu" }, "SAVECOMPOSITION": { diff --git a/projects/hslayers/assets/locales/en.json b/projects/hslayers/assets/locales/en.json index 86126e5481..d5492be4bd 100644 --- a/projects/hslayers/assets/locales/en.json +++ b/projects/hslayers/assets/locales/en.json @@ -803,7 +803,7 @@ "confirmClear": "Confirm clear", "confirmDelete": "Confirm delete", "coordinates": "Coordinates", - "deleteAllSelected": "Delete all selected features", + "deleteAllSelected": "Delete all selected removable features", "downloadAs": "Download as", "feature": { "attributeName": "Attribute name", @@ -831,7 +831,7 @@ }, "reallyDelete": "Really delete this feature?", "reallyDeleteAllFeaturesFrom": "Really delete all features from layer {0}?", - "reallyDeleteAllSelectedLayers": "Really delete all selected features?", + "reallyDeleteAllSelectedLayers": "Do you really want to delete all selected removable features?", "untitledFeature": "Untitled feature" }, "SAVECOMPOSITION": { diff --git a/projects/hslayers/assets/locales/lv.json b/projects/hslayers/assets/locales/lv.json index 3848390e5a..ee3765f79a 100644 --- a/projects/hslayers/assets/locales/lv.json +++ b/projects/hslayers/assets/locales/lv.json @@ -787,7 +787,7 @@ }, "reallyDelete": "Vai tiešām vēlaties dzēst šo objektu?", "reallyDeleteAllFeaturesFrom": "Vai tiešām vēlaties izdzēst visus objektus no slāņa {0}?", - "reallyDeleteAllSelectedLayers": "Vai tiešām dzēst visus atlasītos grafiskos objektus?", + "reallyDeleteAllSelectedLayers": "Vai tiešām vēlaties dzēst visas atlasītās noņemamās funkcijas?", "untitledFeature": "Objekts bez nosaukuma" }, "SAVECOMPOSITION": { diff --git a/projects/hslayers/assets/locales/sk.json b/projects/hslayers/assets/locales/sk.json index 02a2bb2bcc..425488e72e 100644 --- a/projects/hslayers/assets/locales/sk.json +++ b/projects/hslayers/assets/locales/sk.json @@ -800,7 +800,7 @@ }, "reallyDelete": "Naozaj zmazať tento prvok?", "reallyDeleteAllFeaturesFrom": "Naozaj odstrániť všetky prvky z vrstvy {0}?", - "reallyDeleteAllSelectedLayers": "Naozaj odstrániť všetky vybrané prvky?", + "reallyDeleteAllSelectedLayers": "Naozaj chcete odstrániť všetky odstrániteľné vybrané funkcie?", "untitledFeature": "Prvok bez názvu" }, "SAVECOMPOSITION": { diff --git a/projects/hslayers/common/query-popup/widgets/layer-name.component.ts b/projects/hslayers/common/query-popup/widgets/layer-name.component.ts index 5b36dbf279..9a6acaa825 100644 --- a/projects/hslayers/common/query-popup/widgets/layer-name.component.ts +++ b/projects/hslayers/common/query-popup/widgets/layer-name.component.ts @@ -1,7 +1,6 @@ import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core'; import {HsLayerDescriptor} from 'hslayers-ng/types'; -import {HsLayerUtilsService} from 'hslayers-ng/services/utils'; import {HsQueryPopupWidgetBaseComponent} from '../query-popup-widget-base.component'; @Component({ @@ -20,20 +19,11 @@ export class HsLayerNameComponent layerDescriptor: HsLayerDescriptor; }; - constructor(private hsLayerUtilsService: HsLayerUtilsService) { + constructor() { super(); } ngOnInit(): void { this.layerDescriptor = this.data.layerDescriptor; } - - /** - * Get title translation - * @param title - Title to translate - * @returns Translated title - */ - translateTitle(title: string): string { - return this.hsLayerUtilsService.translateTitle(title); - } } diff --git a/projects/hslayers/components/print/print-legend.service.ts b/projects/hslayers/components/print/print-legend.service.ts index 98f9339f0d..e9ae9a2745 100644 --- a/projects/hslayers/components/print/print-legend.service.ts +++ b/projects/hslayers/components/print/print-legend.service.ts @@ -4,7 +4,7 @@ import {Observable, Subject, Subscription} from 'rxjs'; import {Vector as VectorLayer} from 'ol/layer'; import {Vector as VectorSource} from 'ol/source'; -import {HsLayerUtilsService} from 'hslayers-ng/services/utils'; +import {HsLanguageService} from 'hslayers-ng/services/language'; import {HsLegendDescriptor} from 'hslayers-ng/components/legend'; import {HsLegendLayerStaticService} from 'hslayers-ng/components/legend'; import {HsLegendService} from 'hslayers-ng/components/legend'; @@ -28,7 +28,7 @@ export class HsPrintLegendService extends PrintLegendParams { private hsMapService: HsMapService, private hsLegendService: HsLegendService, private hsLegendLayerStaticService: HsLegendLayerStaticService, - private hsLayerUtilsService: HsLayerUtilsService, + private hsLanguageService: HsLanguageService, private hsShareThumbnailService: HsShareThumbnailService, ) { super(); @@ -148,7 +148,11 @@ export class HsPrintLegendService extends PrintLegendParams { for (const sublayer of desc.subLayerLegends) { const wmsSvg = await this.legendImageToSvg( sublayer, - this.hsLayerUtilsService.translateTitle(desc.title), + this.hsLanguageService.getTranslationIgnoreNonExisting( + 'LAYERS', + desc.title, + undefined, + ), ); if (wmsSvg) { svgSources.push(wmsSvg); @@ -198,7 +202,11 @@ export class HsPrintLegendService extends PrintLegendParams { } svgSource = this.legendToSvg( legendSource, - this.hsLayerUtilsService.translateTitle(desc.title), + this.hsLanguageService.getTranslationIgnoreNonExisting( + 'LAYERS', + desc.title, + undefined, + ), ); } else { for (const category of (desc.lyr.getSource() as SparqlJson) @@ -220,13 +228,21 @@ export class HsPrintLegendService extends PrintLegendParams { case 'image': svgSource = await this.legendImageToSvg( layerLegend.lastLegendImage, - this.hsLayerUtilsService.translateTitle(desc.title), + this.hsLanguageService.getTranslationIgnoreNonExisting( + 'LAYERS', + desc.title, + undefined, + ), ); break; case 'svg': svgSource = this.legendToSvg( layerLegend.lastLegendImage, - this.hsLayerUtilsService.translateTitle(desc.title), + this.hsLanguageService.getTranslationIgnoreNonExisting( + 'LAYERS', + desc.title, + undefined, + ), ); break; default: diff --git a/projects/hslayers/components/query/attribute-row/attribute-row.component.html b/projects/hslayers/components/query/attribute-row/attribute-row.component.html index a4b219c79c..0037776911 100644 --- a/projects/hslayers/components/query/attribute-row/attribute-row.component.html +++ b/projects/hslayers/components/query/attribute-row/attribute-row.component.html @@ -2,9 +2,9 @@
{{attribute.name}} + [readonly]="readonly" name="hs-query-attribute-row-input">
- + \ No newline at end of file diff --git a/projects/hslayers/components/query/feature-common.service.ts b/projects/hslayers/components/query/feature-common.service.ts index 012df8307f..063e59c652 100644 --- a/projects/hslayers/components/query/feature-common.service.ts +++ b/projects/hslayers/components/query/feature-common.service.ts @@ -42,6 +42,8 @@ export class HsFeatureCommonService { map.getLayers().on('change:length', () => { this.updateLayerList(); }); + + this.updateLayerList(); }); } diff --git a/projects/hslayers/components/query/feature-list/feature-list.component.html b/projects/hslayers/components/query/feature-list/feature-list.component.html index ab33e310c4..e060cbe037 100644 --- a/projects/hslayers/components/query/feature-list/feature-list.component.html +++ b/projects/hslayers/components/query/feature-list/feature-list.component.html @@ -60,4 +60,4 @@ [feature]="item"> - + \ No newline at end of file diff --git a/projects/hslayers/components/query/feature-list/feature-list.component.ts b/projects/hslayers/components/query/feature-list/feature-list.component.ts index 57da476bfc..4b15fe64f5 100644 --- a/projects/hslayers/components/query/feature-list/feature-list.component.ts +++ b/projects/hslayers/components/query/feature-list/feature-list.component.ts @@ -127,7 +127,9 @@ export class HsQueryFeatureListComponent { ); const confirmed = await dialog.waitResult(); if (confirmed == 'yes') { - for (const feature of this.hsQueryBaseService.features) { + for (const feature of this.hsQueryBaseService.features.filter((f) => + this.hsQueryVectorService.isFeatureRemovable(f.feature), + )) { //Give HsQueryVectorService.featureRemovals time to splice QueryBase.data.features setTimeout(() => { this.hsQueryVectorService.removeFeature(feature.feature); diff --git a/projects/hslayers/components/query/feature/feature.component.html b/projects/hslayers/components/query/feature/feature.component.html index 83f03ff1ba..27eec8a1be 100644 --- a/projects/hslayers/components/query/feature/feature.component.html +++ b/projects/hslayers/components/query/feature/feature.component.html @@ -5,7 +5,7 @@ {{feature.layer}} + [feature]="feature" [attribute]="attribute" [readonly]="readonly"> @@ -38,7 +38,7 @@ [(ngModel)]="selectedLayer" name="selectedLayer"> - +