Skip to content

Commit

Permalink
fix: ignore checked attribute for groups
Browse files Browse the repository at this point in the history
  • Loading branch information
simonseyock committed Jun 11, 2024
1 parent 2e7926c commit 851fd3f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/parser/SHOGunApplicationUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ class SHOGunApplicationUtil<T extends Application, S extends Layer> {
const nodes = await this.parseNodes(layerTree.children, layers, projection, keepClientConfig);

return new OlLayerGroup({
layers: nodes.reverse(),
visible: layerTree.checked
layers: nodes.reverse()
});
}
} catch (e) {
Expand Down Expand Up @@ -217,11 +216,8 @@ class SHOGunApplicationUtil<T extends Application, S extends Layer> {
async parseFolder(el: DefaultLayerTree, layers: S[], projection?: OlProjectionLike, keepClientConfig = false) {
const layersInFolder = await this.parseNodes(el.children, layers, projection, keepClientConfig);

const visible = el.checked || layersInFolder.some(layer => layer.getVisible());

const folder = new OlLayerGroup({
layers: layersInFolder.reverse(),
visible
layers: layersInFolder.reverse()
});

folder.set('name', el.title);
Expand Down

0 comments on commit 851fd3f

Please sign in to comment.