diff --git a/tools/ora_editor/templates/editor.html b/tools/ora_editor/templates/editor.html
index 13743b7..c078e9f 100644
--- a/tools/ora_editor/templates/editor.html
+++ b/tools/ora_editor/templates/editor.html
@@ -115,8 +115,10 @@
},
async toggleVisibility(layerName, visible) {
- const layer = this.layers.find(l => l.name === layerName);
- if (layer) layer.visible = visible;
+ const idx = this.layers.findIndex(l => l.name === layerName);
+ if (idx >= 0) {
+ this.$set(this.layers[idx], 'visible', visible);
+ }
await fetch('/api/layer/visibility', {
method: 'POST',
@@ -548,8 +550,7 @@