Skip to content

Commit

Permalink
fix: no legend message (origo-map#1873)
Browse files Browse the repository at this point in the history
* fix: replicate prior elements for no legend message

* fix: change no legend string to rhyme with related recent changes and make it smaller
  • Loading branch information
Grammostola authored Oct 27, 2023
1 parent 8386159 commit fd09146
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/legendmaker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit fd09146

Please sign in to comment.