Skip to content

Commit

Permalink
Merge pull request #334 from BenediktSeidlSWM/remove-config
Browse files Browse the repository at this point in the history
Remove global showOnlyLayerGroups option
  • Loading branch information
manisandro authored Sep 19, 2024
2 parents fd984f6 + fbd9d28 commit ee82896
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 ee82896

Please sign in to comment.