Skip to content

Commit

Permalink
Merge pull request #995 from dbauszus-glx/ui-layer-view
Browse files Browse the repository at this point in the history
layer.view() method must return layer
  • Loading branch information
dbauszus-glx authored Nov 10, 2023
2 parents ae83ebd + 40388e4 commit 9f6efb2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/ui/layers/listview.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import view from './view.mjs'

mapp.utils.merge(mapp.dictionaries, {
en: {
layer_group_hide_layers: 'Hide all layers in group',
Expand Down Expand Up @@ -45,7 +43,7 @@ export default function (params){
if (layer.hidden) return;

// Create the layer view.
view(layer)
mapp.ui.layers.view(layer)

if (!layer.group) {
listview.node.appendChild(layer.view)
Expand Down
4 changes: 3 additions & 1 deletion lib/ui/layers/view.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default (layer) => {
if (layer.view === null) {

// Do not create a layer view.
return;
return layer;
}

layer.view = mapp.utils.html.node`<div class="layer-view">`
Expand Down Expand Up @@ -130,4 +130,6 @@ export default (layer) => {
}

})

return layer
}

0 comments on commit 9f6efb2

Please sign in to comment.