From 4f4d60b743caf32aa6a214fc50163ac0126a3755 Mon Sep 17 00:00:00 2001 From: Dennis Bauszus Date: Fri, 1 Nov 2024 07:09:43 +0000 Subject: [PATCH] Remove data-id assignment for layer-view element (#1633) --- lib/ui/layers/listview.mjs | 2 +- lib/ui/layers/view.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ui/layers/listview.mjs b/lib/ui/layers/listview.mjs index 341b46233c..6b608f7dce 100644 --- a/lib/ui/layers/listview.mjs +++ b/lib/ui/layers/listview.mjs @@ -104,7 +104,7 @@ export default function (params) { group.meta = mapp.utils.html.node`
` group.drawer = mapp.ui.elements.drawer({ - data_id: `layer-drawer`, + data_id: layer.group, class: `layer-group ${layer.groupClassList || ''}`, header: mapp.utils.html`

${layer.group}

diff --git a/lib/ui/layers/view.mjs b/lib/ui/layers/view.mjs index 3b4c76c10f..19645f354b 100644 --- a/lib/ui/layers/view.mjs +++ b/lib/ui/layers/view.mjs @@ -166,7 +166,7 @@ export default function layerView(layer) { const drawerClass = `layer-view raised ${layer.classList || ''} ${content.length ? '' : 'empty'}` layer.drawer = mapp.ui.elements.drawer({ - data_id: `layer-drawer`, + data_id: layer.key, class: drawerClass, header, content @@ -242,7 +242,7 @@ function changeEnd(layer) { layer.zoomBtn.style.display = 'block' // Collapse drawer and disable layer.view. - layer.view.querySelector('[data-id=layer-drawer]').classList.remove('expanded') + layer.view.querySelector('.layer-view.drawer').classList.remove('expanded') // Disable layer display toggle. layer.displayToggle.classList.add('disabled')