From 087ac4ca0ef50e39cb36025e4b822ebd13e48a7f Mon Sep 17 00:00:00 2001 From: Bryce Date: Fri, 27 Mar 2026 15:55:12 -0700 Subject: [PATCH] Fix layer visibility toggle reactivity - Use $set() for array property updates in Alpine.js - Change tintRed to use x-model for proper reactivity --- tools/ora_editor/templates/editor.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 @@