Skip to content

Commit

Permalink
fix: check if layerLegend.width was provided manually
Browse files Browse the repository at this point in the history
  • Loading branch information
silvester-pari committed Dec 9, 2024
1 parent 5fe17a6 commit 8eee372
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion elements/layercontrol/src/components/layer-legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,11 @@ export class EOxLayerControlLayerLegend extends LitElement {
}

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

0 comments on commit 8eee372

Please sign in to comment.