diff --git a/lib/ui/layers/view.mjs b/lib/ui/layers/view.mjs index 94be2c051..701c44fa0 100644 --- a/lib/ui/layers/view.mjs +++ b/lib/ui/layers/view.mjs @@ -32,22 +32,22 @@ mapp.utils.merge(mapp.dictionaries, { export default (layer) => { if (layer.view === null) { - + // Do not create a layer view. - return layer; + return layer; } layer.view = mapp.utils.html.node`
` - + // Create content from layer view panels and plugins const content = Object.keys(layer) .map(key => mapp.ui.layers.panels[key] && mapp.ui.layers.panels[key](layer)) .filter(panel => typeof panel !== 'undefined') // Set default order for panel if not explicit in layer config. - layer.panelOrder = layer.panelOrder || ['draw-drawer','dataviews-drawer','filter-drawer','style-drawer','meta'] + layer.panelOrder = layer.panelOrder || ['draw-drawer', 'dataviews-drawer', 'filter-drawer', 'style-drawer', 'meta'] - content.sort((a,b)=>{ + content.sort((a, b) => { // Sort according to data-id in panelOrder array. return layer.panelOrder.findIndex(chk => chk === a.dataset?.id) @@ -62,16 +62,16 @@ export default (layer) => { data-id=zoomToExtent title=${mapp.dictionary.layer_zoom_to_extent} class="mask-icon fullscreen" - onclick=${async e=>{ - - // response indicates whether locations were found. - let response = await layer.zoomToExtent() - - // disable button if no locations were found. - e.target.disabled = !response - }}>` || `` - - // Create toogleDisplay button for header. + onclick=${async e => { + + // response indicates whether locations were found. + let response = await layer.zoomToExtent() + + // disable button if no locations were found. + e.target.disabled = !response + }}>` || `` + + // Create toggleDisplay button for header. const toggleDisplay = mapp.utils.html.node`