refactor: hide controls for hidden layers
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user