From fd09146edefb8be661157f91550d02473fa52a30 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 27 Oct 2023 12:37:46 +0200 Subject: [PATCH] fix: no legend message (#1873) * fix: replicate prior elements for no legend message * fix: change no legend string to rhyme with related recent changes and make it smaller --- src/utils/legendmaker.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/legendmaker.js b/src/utils/legendmaker.js index 637eaf554..624471b6c 100644 --- a/src/utils/legendmaker.js +++ b/src/utils/legendmaker.js @@ -239,7 +239,7 @@ export const renderExtendedThematicLegendItem = function renderExtendedThematicL export const Legend = function Legend({ styleRules, layer, viewer, clickable = true, opacity = 1 } = {}) { - const noLegend = 'Legend saknas'; + const noLegend = 'Teckenförklaring saknas'; if (Array.isArray(styleRules)) { let styleName; const layerType = layer.get('type'); @@ -293,7 +293,9 @@ export const Legend = function Legend({ }); return El({ components: cmps, tagName: 'ul' }); } - return El({ innerHTML: noLegend }); + const noLegendInner = El({ innerHTML: noLegend, tagName: 'li', cls: 'padding-smaller text-smaller' }); + const noLegendOuter = El({ components: [noLegendInner], tagName: 'ul' }); + return noLegendOuter; }; export const HeaderIcon = function HeaderIcon(styleRules, opacity = 1) {