Skip to content

Commit 48b2866

Browse files
also hide if outside zoomrange
1 parent 1274f05 commit 48b2866

File tree

1 file changed

+3
-1
lines changed
  • x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry

1 file changed

+3
-1
lines changed

x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/layer_control/layer_toc/toc_entry/view.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ export class TOCEntry extends React.Component {
4747

4848
async _loadHasLegendDetails() {
4949
const hasLegendDetails =
50-
(await this.props.layer.hasLegendDetails()) && this.props.layer.isVisible();
50+
(await this.props.layer.hasLegendDetails()) &&
51+
this.props.layer.isVisible() &&
52+
this.props.layer.showAtZoomLevel(this.props.zoom);
5153
if (this._isMounted && hasLegendDetails !== this.state.hasLegendDetails) {
5254
this.setState({ hasLegendDetails });
5355
}

0 commit comments

Comments
 (0)