child nodes get repositioned correctly when resizing top or left
This commit is contained in:
@@ -116,6 +116,29 @@ const initialNodes: Node[] = [
|
||||
position: { x: 250, y: 400 },
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
type: 'defaultResizer',
|
||||
data: { label: 'Parent' },
|
||||
position: { x: 700, y: 0 },
|
||||
style: { ...nodeStyle, width: 300, height: 300 },
|
||||
},
|
||||
{
|
||||
id: '5a',
|
||||
type: 'defaultResizer',
|
||||
data: { label: 'Child' },
|
||||
position: { x: 50, y: 50 },
|
||||
parentNode: '5',
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '5b',
|
||||
type: 'defaultResizer',
|
||||
data: { label: 'Child' },
|
||||
position: { x: 100, y: 100 },
|
||||
parentNode: '5',
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
];
|
||||
|
||||
const CustomNodeFlow = () => {
|
||||
|
||||
Reference in New Issue
Block a user