Skip to content

Commit

Permalink
fix: restore style that was not meant to be changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Grammostola committed Mar 13, 2024
1 parent 5a0a602 commit a1296b6
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/controls/legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,8 @@ const Legend = function Legend(options = {}) {
title: layer.get('title'),
state: layer.get('visible') ? 'active' : undefined,
methods: {
active: () => {
layer.setVisible(true);
},
initial: () => {
layer.setVisible(false);
}
active: () => layer.setVisible(true),
initial: () => layer.setVisible(false)
},
click() {
const overlayComponent = visibleLayersControl && visibleLayersViewActive ? visibleOverlaysCmp : overlaysCmp;
Expand Down Expand Up @@ -455,9 +451,7 @@ const Legend = function Legend(options = {}) {
const groupExclusive = (viewer.getGroup(layerGroup) && (viewer.getGroup(layerGroup).exclusive || viewer.getGroup(layerGroup).name === 'background'));
if (groupExclusive) {
const layers = viewer.getLayersByProperty('group', layerGroup);
layers.forEach(l => {
l.setVisible(false);
});
layers.forEach(l => l.setVisible(false));
}
layer.setVisible(true);
document.getElementsByClassName('o-search-layer-field')[0].value = '';
Expand Down

0 comments on commit a1296b6

Please sign in to comment.