From 6c0481ef51c643061a5e720b9e2cba8bad2678b3 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Fri, 12 Apr 2024 18:12:36 +1000 Subject: [PATCH] fix(ui): do not reset layer position when toggling visibility --- .../features/regionalPrompts/components/LayerComponent.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/invokeai/frontend/web/src/features/regionalPrompts/components/LayerComponent.tsx b/invokeai/frontend/web/src/features/regionalPrompts/components/LayerComponent.tsx index e0fda9cd27..0446a97ad6 100644 --- a/invokeai/frontend/web/src/features/regionalPrompts/components/LayerComponent.tsx +++ b/invokeai/frontend/web/src/features/regionalPrompts/components/LayerComponent.tsx @@ -100,10 +100,6 @@ export const LayerComponent: React.FC = ({ id }) => { groupRef.current.cache(); }, [layer.objects, layer.color, layer.isVisible]); - if (!layer.isVisible) { - return null; - } - return ( <> = ({ id }) => { name={REGIONAL_PROMPT_LAYER_NAME} onDragMove={onDragMove} dragBoundFunc={dragBoundFunc} + visible={layer.isVisible} draggable >