}
- */
- renderLayerGroups = (shouldRender = true) => {
+ render() {
+ const { windowVisible } = this.props;
return (
- {this.options.groups.map((group, i) => {
- return (
-
- );
- })}
-
- );
- };
-
- /**
- * BreadCrumbs are a feature used to "link" content between LayerSwitcher
- * and Informative plugins. They get rendered directly to #map, as they
- * are not part of LayerSwitcher plugin, at least not visually. To achieve
- * that we use createPortal().
- *
- * @returns
- * @memberof LayersSwitcherView
- */
- renderBreadCrumbs = () => {
- return (
- this.options.showBreadcrumbs &&
- createPortal(
- // We must wrap the component in a div, on which we can catch
- // events. This is done to prevent event bubbling to the
- // layerSwitcher component.
-
e.stopPropagation()}>
-
-
,
- document.getElementById("breadcrumbs-container")
- )
- );
- };
-
- render() {
- const { windowVisible } = this.props;
- return (
-
- {this.#renderRegularLayersView && (
-
- )}
- {this.#renderBackgroundLayersView && (
-
- )}
- {this.#renderActiveLayersView && (
-
+
+
+ {this.options.showDrawOrderView === true && (
+
)}
-
- {this.#renderRegularLayersView &&
- this.renderLayerGroups(this.state.activeTab === "regularLayers")}
- {this.#renderBackgroundLayersView && (
-
+
+ {this.props.options.showFilter && (
+
+ this.handleFilterValueChange(value)
+ }
+ />
+ )}
+
+ this.handleLayerPackageToggle({ event: e })
+ }
+ favoritesViewDisplay={
+ this.state.displayContentOverlay === "favorites"
+ }
+ handleFavoritesViewToggle={this.handleFavoritesViewToggle}
+ favoritesInfoText={this.options.userQuickAccessFavoritesInfoText}
+ treeData={this.state.treeData}
+ filterValue={this.state.filterValue}
/>
+ {this.state.treeData.map((group, i) => (
+
+ ))}
+
+ {this.props.options.enableQuickAccessTopics && (
+
)}
- {this.#renderActiveLayersView &&
- this.state.activeTab === "activeLayers" && (
-
- )}
-
- {this.renderBreadCrumbs()}
-
+
+
+ {this.options.showDrawOrderView === true && (
+
+ )}
+ {this.options.showBreadcrumbs && (
+
+ )}
+
+