refactor(nodes): use relative positions for children

This commit is contained in:
moklick
2021-11-02 18:58:47 +01:00
parent 8cd969dd84
commit 248b563231
8 changed files with 168 additions and 80 deletions
+4 -4
View File
@@ -35,14 +35,14 @@ const initialNodes: Node[] = [
{
id: '4a',
data: { label: 'Node 4a' },
position: { x: 115, y: 215 },
position: { x: 15, y: 15 },
className: 'light',
parentNode: '4',
},
{
id: '4b',
data: { label: 'Node 4b' },
position: { x: 250, y: 250 },
position: { x: 80, y: 80 },
className: 'light',
style: { backgroundColor: 'rgba(255, 0, 0, .2)' },
parentNode: '4',
@@ -52,14 +52,14 @@ const initialNodes: Node[] = [
{
id: '4b1',
data: { label: 'Node 4b1' },
position: { x: 270, y: 270 },
position: { x: 20, y: 20 },
className: 'light',
parentNode: '4b',
},
{
id: '4b2',
data: { label: 'Node 4b2' },
position: { x: 500, y: 400 },
position: { x: 100, y: 100 },
className: 'light',
parentNode: '4b',
},