From 40388e47cb44b58ba53ae6311026486b915dc028 Mon Sep 17 00:00:00 2001 From: dbauszus-glx Date: Thu, 9 Nov 2023 16:25:42 +0000 Subject: [PATCH] layer.view() method must return layer --- lib/ui/layers/listview.mjs | 4 +--- lib/ui/layers/view.mjs | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ui/layers/listview.mjs b/lib/ui/layers/listview.mjs index c70b1c4e7..abaf5f82d 100644 --- a/lib/ui/layers/listview.mjs +++ b/lib/ui/layers/listview.mjs @@ -1,5 +1,3 @@ -import view from './view.mjs' - mapp.utils.merge(mapp.dictionaries, { en: { layer_group_hide_layers: 'Hide all layers in group', @@ -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) diff --git a/lib/ui/layers/view.mjs b/lib/ui/layers/view.mjs index 543f51d6e..94be2c051 100644 --- a/lib/ui/layers/view.mjs +++ b/lib/ui/layers/view.mjs @@ -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`
` @@ -130,4 +130,6 @@ export default (layer) => { } }) + + return layer } \ No newline at end of file