maplibre-gl-layer-control-tidop 0.0.13 → 0.0.15
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 +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1272,6 +1272,10 @@ 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
1279
|
const widthControl = this.createWidthControl();
|
|
1276
1280
|
header.appendChild(widthControl);
|
|
1277
1281
|
return header;
|
|
@@ -2119,6 +2123,8 @@ class LayerControl {
|
|
|
2119
2123
|
button.setAttribute("aria-label", `Edit style for ${layerId}`);
|
|
2120
2124
|
}
|
|
2121
2125
|
button.addEventListener("click", (e) => {
|
|
2126
|
+
e.stopPropagation();
|
|
2127
|
+
this.toggleStyleEditor(layerId);
|
|
2122
2128
|
console.log(e);
|
|
2123
2129
|
});
|
|
2124
2130
|
return button;
|
|
@@ -2128,12 +2134,16 @@ class LayerControl {
|
|
|
2128
2134
|
*/
|
|
2129
2135
|
toggleStyleEditor(layerId) {
|
|
2130
2136
|
if (this.state.activeStyleEditor === layerId) {
|
|
2137
|
+
var el = document.getElementById("layer-control-panel-layer-id");
|
|
2138
|
+
console.log(el);
|
|
2131
2139
|
this.closeStyleEditor(layerId);
|
|
2132
2140
|
return;
|
|
2133
2141
|
}
|
|
2134
2142
|
if (this.state.activeStyleEditor) {
|
|
2135
2143
|
this.closeStyleEditor(this.state.activeStyleEditor);
|
|
2136
2144
|
}
|
|
2145
|
+
var el = document.getElementById("layer-control-panel-layer-id");
|
|
2146
|
+
console.log(el);
|
|
2137
2147
|
this.openStyleEditor(layerId);
|
|
2138
2148
|
}
|
|
2139
2149
|
/**
|