maplibre-gl-layer-control-tidop 0.0.16 → 0.0.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1272,10 +1272,11 @@ class LayerControl {
1272
1272
  title.className = "layer-control-panel-title";
1273
1273
  title.textContent = "Layers";
1274
1274
  header.appendChild(title);
1275
- const span = document.createElement("span");
1276
- span.id = "layer-control-panel-layer-id";
1277
- span.className = "layer-control-panel-layer-id";
1278
- header.appendChild(span);
1275
+ const input = document.createElement("input");
1276
+ input.id = "layer-control-panel-layer-id";
1277
+ input.className = "layer-control-panel-layer-id";
1278
+ input.value = "";
1279
+ header.appendChild(input);
1279
1280
  const widthControl = this.createWidthControl();
1280
1281
  header.appendChild(widthControl);
1281
1282
  return header;
@@ -2134,18 +2135,18 @@ class LayerControl {
2134
2135
  */
2135
2136
  toggleStyleEditor(layerId) {
2136
2137
  if (this.state.activeStyleEditor === layerId) {
2137
- var el = this.panel.querySelector(".layer-control-panel-title");
2138
+ var el = this.panel.querySelector(".layer-control-panel-layer-id");
2138
2139
  if (el)
2139
- el.innerHTML = "";
2140
+ el.textContent = "";
2140
2141
  this.closeStyleEditor(layerId);
2141
2142
  return;
2142
2143
  }
2143
2144
  if (this.state.activeStyleEditor) {
2144
2145
  this.closeStyleEditor(this.state.activeStyleEditor);
2145
2146
  }
2146
- var el = this.panel.querySelector(".layer-control-panel-title");
2147
+ var el = this.panel.querySelector(".layer-control-panel-layer-id");
2147
2148
  if (el)
2148
- el.innerHTML = layerId;
2149
+ el.textContent = layerId;
2149
2150
  this.openStyleEditor(layerId);
2150
2151
  }
2151
2152
  /**