From 647ab3ae1345994f488365c5371a297f4eda2b97 Mon Sep 17 00:00:00 2001 From: Benedikt Seidl Date: Mon, 22 Jul 2024 17:13:58 +0200 Subject: [PATCH] Select layers when clicking on title --- plugins/LayerTree.jsx | 4 ++-- plugins/style/LayerTree.css | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/LayerTree.jsx b/plugins/LayerTree.jsx index b323d398c..fc54f5a17 100644 --- a/plugins/LayerTree.jsx +++ b/plugins/LayerTree.jsx @@ -243,7 +243,7 @@ class LayerTree extends React.Component {
this.groupExpandedToggled(layer, path, group.expanded)} /> this.itemVisibilityToggled(layer, path, visibility)} /> - {group.title} + this.itemVisibilityToggled(layer, path, visibility)} title={group.title}>{group.title} {LayerUtils.hasQueryableSublayers(group) && this.props.allowSelectIdentifyableLayers ? ( this.itemOmitQueryableToggled(layer, path, omitqueryable)} />) : null} this.layerMenuToggled(group.uuid)}/> @@ -308,7 +308,7 @@ class LayerTree extends React.Component { if (layer.type === "separator") { title = ( this.props.changeLayerProperty(layer.uuid, "title", ev.target.value)} value={sublayer.title}/>); } else { - title = ({sublayer.title}); + title = ( this.itemVisibilityToggled(layer, path, sublayer.visibility)} title={sublayer.title}>{sublayer.title}); } let queryableicon = null; if (this.props.allowSelectIdentifyableLayers) { diff --git a/plugins/style/LayerTree.css b/plugins/style/LayerTree.css index 749f490df..e9875a657 100644 --- a/plugins/style/LayerTree.css +++ b/plugins/style/LayerTree.css @@ -163,6 +163,7 @@ img.layertree-item-legend-tooltip { overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; + cursor: pointer; } #LayerTree div.layertree-item-noresults {