@rural-environmental-registry/map_component 2.0.2 → 2.0.3
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.mjs +1728 -1726
- package/package.json +1 -1
- package/src/components/menu/LayerMenu.vue +5 -2
- package/src/components/menu/SectionMenu.vue +7 -3
package/package.json
CHANGED
|
@@ -223,8 +223,11 @@
|
|
|
223
223
|
): { sectionKey: string; layer: LayerData } | null => {
|
|
224
224
|
for (const section of normalizedSections.value) {
|
|
225
225
|
for (const group of section.groups) {
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
let found: LayerData | undefined
|
|
227
|
+
walkMenuLayers(group.layers, (layer) => {
|
|
228
|
+
if (!found && layer.key === layerKey) found = layer
|
|
229
|
+
})
|
|
230
|
+
if (found) return { sectionKey: section.key, layer: found }
|
|
228
231
|
}
|
|
229
232
|
}
|
|
230
233
|
return null
|
|
@@ -148,7 +148,8 @@
|
|
|
148
148
|
import {
|
|
149
149
|
resolveEditControlAction,
|
|
150
150
|
resolveLayerActions,
|
|
151
|
-
resolveLayerMetrics
|
|
151
|
+
resolveLayerMetrics,
|
|
152
|
+
walkMenuLayers
|
|
152
153
|
} from '../../utils/layersConfigNormalizer'
|
|
153
154
|
|
|
154
155
|
const DEFAULT_ACTION_STYLE: Required<LayerActionStyle> = {
|
|
@@ -226,8 +227,11 @@
|
|
|
226
227
|
): { layer: LayerData; group: GroupLayerData } | null => {
|
|
227
228
|
if (!layerKey || !section.value) return null
|
|
228
229
|
for (const group of section.value.groups) {
|
|
229
|
-
|
|
230
|
-
|
|
230
|
+
let found: LayerData | undefined
|
|
231
|
+
walkMenuLayers(group.layers, (layer) => {
|
|
232
|
+
if (!found && layer.key === layerKey) found = layer
|
|
233
|
+
})
|
|
234
|
+
if (found) return { layer: found, group }
|
|
231
235
|
}
|
|
232
236
|
return null
|
|
233
237
|
}
|