refactor: hide controls for hidden layers
This commit is contained in:
parent
97923c8d35
commit
29d8a76cd1
|
|
@ -49,6 +49,8 @@ export function LayerEditorPanel(props: LayerEditorPanelProps) {
|
||||||
/>
|
/>
|
||||||
<span class="text-sm flex-1">{layer.prop}</span>
|
<span class="text-sm flex-1">{layer.prop}</span>
|
||||||
</div>
|
</div>
|
||||||
|
{layer.visible && (
|
||||||
|
<>
|
||||||
<button
|
<button
|
||||||
onClick={() => store.actions.setEditingLayer(store.state.editingLayer === layer.prop ? null : layer.prop)}
|
onClick={() => store.actions.setEditingLayer(store.state.editingLayer === layer.prop ? null : layer.prop)}
|
||||||
class={`text-xs px-2 py-1 rounded cursor-pointer ${
|
class={`text-xs px-2 py-1 rounded cursor-pointer ${
|
||||||
|
|
@ -87,6 +89,8 @@ export function LayerEditorPanel(props: LayerEditorPanelProps) {
|
||||||
min="0.1"
|
min="0.1"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue