From 1d2368e98f0f6f299c9c233b8a8dcd911478916d Mon Sep 17 00:00:00 2001 From: kalytka Date: Mon, 3 Apr 2023 11:03:58 +0300 Subject: [PATCH] Refactoring --- .../app/modules/home/components/widget/lib/maps/maps-utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/maps-utils.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/maps-utils.ts index 585f0cd54a..4aad829eac 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/maps-utils.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/maps-utils.ts @@ -95,13 +95,13 @@ interface labelSettings { } export function entitiesParseName(entities: FormattedData[], labelSettings: labelSettings): FormattedData[] { + const div = document.createElement('div'); for (const entity of entities) { if (labelSettings?.showLabel) { const pattern = labelSettings.useLabelFunction ? safeExecute(labelSettings.parsedLabelFunction, [entity, entities, entity.dsIndex]) : labelSettings.label; const markerLabelText = parseWithTranslation.prepareProcessPattern(pattern, true); const replaceInfoLabelMarker = processDataPattern(pattern, entity); - const div = document.createElement('div'); div.innerHTML = fillDataPattern(markerLabelText, replaceInfoLabelMarker, entity); entity.entityParseName = div.textContent || div.innerText || ''; } else {