Skip to content

Commit

Permalink
fix(style). max-width of layer legend
Browse files Browse the repository at this point in the history
  • Loading branch information
silvester-pari committed Dec 9, 2024
1 parent 61058ea commit 5fe17a6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions elements/layercontrol/src/components/layer-legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ export class EOxLayerControlLayerLegend extends LitElement {
return this.noShadow ? this : super.createRenderRoot();
}

updated() {
if (this.offsetWidth < 325 && this.offsetWidth !== this.layerLegend.width) {
this.layerLegend.width = this.offsetWidth;
this.requestUpdate();
}
}

/**
* Renders a Time Control for datetime options of a layer.
*/
Expand Down Expand Up @@ -124,6 +131,7 @@ export class EOxLayerControlLayerLegend extends LitElement {
--cle-font-size: inherit;
--cle-font-weight: inherit --cle-letter-spacing: inherit;
--cle-letter-spacing-title: inherit;
--cle-padding: 0;
}
`;
#styleEOX = ``;
Expand Down

0 comments on commit 5fe17a6

Please sign in to comment.