fix(ui): do not reset layer position when toggling visibility

This commit is contained in:
psychedelicious 2024-04-12 18:12:36 +10:00 committed by Kent Keirsey
parent b9d0da44eb
commit 6c0481ef51

View File

@ -100,10 +100,6 @@ export const LayerComponent: React.FC<Props> = ({ id }) => {
groupRef.current.cache();
}, [layer.objects, layer.color, layer.isVisible]);
if (!layer.isVisible) {
return null;
}
return (
<>
<KonvaLayer
@ -112,6 +108,7 @@ export const LayerComponent: React.FC<Props> = ({ id }) => {
name={REGIONAL_PROMPT_LAYER_NAME}
onDragMove={onDragMove}
dragBoundFunc={dragBoundFunc}
visible={layer.isVisible}
draggable
>
<KonvaGroup