Skip to content

Commit

Permalink
Remove global showOnlyLayerGroups option
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktSeidlSWM committed Sep 19, 2024
1 parent fd984f6 commit fbd9d28
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions plugins/LayerTree.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,7 @@ class LayerTree extends React.Component {
checkboxstate = 'radio_' + checkboxstate;
}
const expanderstate = group.expanded ? 'tree_minus' : 'tree_plus';
const onlyGroups = ConfigUtils.getConfigProp("showOnlyLayerGroups", this.props.theme) || this.props.onlyGroups;
const showExpander = !onlyGroups || (group.sublayers || []).some((sublayer) => sublayer.sublayers);
const showExpander = !this.props.onlyGroups || (group.sublayers || []).some((sublayer) => sublayer.sublayers);
const itemclasses = {
"layertree-item": true,
"layertree-item-disabled": (!this.props.groupTogglesSublayers && !enabled) || (this.props.grayUnchecked && !visibility)
Expand Down Expand Up @@ -262,8 +261,7 @@ class LayerTree extends React.Component {
);
};
renderLayer = (layer, sublayer, path, enabled = true, inMutuallyExclusiveGroup = false, skipExpanderPlaceholder = false) => {
const onlyGroups = ConfigUtils.getConfigProp("showOnlyLayerGroups", this.props.theme) || this.props.onlyGroups;
if (onlyGroups) {
if (this.props.onlyGroups) {
return null;
}
if (this.state.filtervisiblelayers && !sublayer.visibility) {
Expand Down

0 comments on commit fbd9d28

Please sign in to comment.