refactor: hide controls for hidden layers

This commit is contained in:
hypercross 2026-03-13 12:34:39 +08:00
parent 97923c8d35
commit 29d8a76cd1
1 changed files with 38 additions and 34 deletions

View File

@ -49,6 +49,8 @@ export function LayerEditorPanel(props: LayerEditorPanelProps) {
/>
<span class="text-sm flex-1">{layer.prop}</span>
</div>
{layer.visible && (
<>
<button
onClick={() => store.actions.setEditingLayer(store.state.editingLayer === layer.prop ? null : layer.prop)}
class={`text-xs px-2 py-1 rounded cursor-pointer ${
@ -87,6 +89,8 @@ export function LayerEditorPanel(props: LayerEditorPanelProps) {
min="0.1"
/>
</div>
</>
)}
</div>
)}
</For>