mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): do not reset layer position when toggling visibility
This commit is contained in:
parent
b9d0da44eb
commit
6c0481ef51
@ -100,10 +100,6 @@ export const LayerComponent: React.FC<Props> = ({ id }) => {
|
|||||||
groupRef.current.cache();
|
groupRef.current.cache();
|
||||||
}, [layer.objects, layer.color, layer.isVisible]);
|
}, [layer.objects, layer.color, layer.isVisible]);
|
||||||
|
|
||||||
if (!layer.isVisible) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<KonvaLayer
|
<KonvaLayer
|
||||||
@ -112,6 +108,7 @@ export const LayerComponent: React.FC<Props> = ({ id }) => {
|
|||||||
name={REGIONAL_PROMPT_LAYER_NAME}
|
name={REGIONAL_PROMPT_LAYER_NAME}
|
||||||
onDragMove={onDragMove}
|
onDragMove={onDragMove}
|
||||||
dragBoundFunc={dragBoundFunc}
|
dragBoundFunc={dragBoundFunc}
|
||||||
|
visible={layer.isVisible}
|
||||||
draggable
|
draggable
|
||||||
>
|
>
|
||||||
<KonvaGroup
|
<KonvaGroup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user