Skip to content

Commit

Permalink
Update legend.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jokd authored Dec 6, 2024
1 parent e4cb1ff commit c75ca72
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/controls/legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ const Legend = function Legend(options = {}) {
const setVisibleLayersViewActive = function setVisibleLayersViewActive(active) {
if (!visibleLayersControl) return;
visibleLayersViewActive = active;
overlaysCmp.readOverlays()
if (visibleLayersViewActive) {
document.getElementById(overlaysCmp.getId()).classList.add('hidden');
document.getElementById(visibleOverlaysCmp.getId()).classList.remove('hidden');
Expand All @@ -233,7 +232,7 @@ const Legend = function Legend(options = {}) {
document.getElementById(toolsCmp.getId()).classList.add('hidden');
} else {
const nrOverlays = overlaysCmp.readOverlays().length;
if(nrOverlays > 0){
if(nrOverlays > 0) {

Check failure on line 235 in src/controls/legend.js

View workflow job for this annotation

GitHub Actions / lint

Expected space(s) after "if"
document.getElementById(overlaysCmp.getId()).classList.remove('hidden');
}
document.getElementById(visibleOverlaysCmp.getId()).classList.add('hidden');
Expand Down

0 comments on commit c75ca72

Please sign in to comment.