chore(examples): use width/height for specifying node sizes

This commit is contained in:
moklick
2024-02-29 13:21:16 +01:00
parent 5f06ef6f59
commit 0de6d4db33
@@ -50,7 +50,9 @@ const initialNodes: Node[] = [
maxHeight: 200, maxHeight: 200,
}, },
position: { x: 0, y: 60 }, position: { x: 0, y: 60 },
style: { ...nodeStyle, width: 100, height: 80 }, width: 100,
height: 80,
style: { ...nodeStyle },
}, },
{ {
id: '1b', id: '1b',
@@ -64,9 +66,9 @@ const initialNodes: Node[] = [
maxHeight: 400, maxHeight: 400,
}, },
position: { x: 250, y: 0 }, position: { x: 250, y: 0 },
width: 174,
height: 123,
style: { style: {
width: 174,
height: 123,
...nodeStyle, ...nodeStyle,
}, },
}, },
@@ -75,7 +77,9 @@ const initialNodes: Node[] = [
type: 'customResizer', type: 'customResizer',
data: { label: 'custom resize icon' }, data: { label: 'custom resize icon' },
position: { x: 0, y: 200 }, position: { x: 0, y: 200 },
style: { width: 100, height: 60, ...nodeStyle }, width: 100,
height: 60,
style: { ...nodeStyle },
}, },
{ {
id: '3', id: '3',
@@ -94,7 +98,8 @@ const initialNodes: Node[] = [
keepAspectRatio: true, keepAspectRatio: true,
}, },
position: { x: 400, y: 200 }, position: { x: 400, y: 200 },
style: { ...nodeStyle, height: 50 }, height: 50,
style: { ...nodeStyle },
}, },
{ {
id: '4', id: '4',
@@ -121,7 +126,9 @@ const initialNodes: Node[] = [
type: 'defaultResizer', type: 'defaultResizer',
data: { label: 'Parent', keepAspectRatio: true }, data: { label: 'Parent', keepAspectRatio: true },
position: { x: 700, y: 0 }, position: { x: 700, y: 0 },
style: { ...nodeStyle, width: 300, height: 400 }, width: 300,
height: 400,
style: { ...nodeStyle },
}, },
{ {
id: '5a', id: '5a',
@@ -132,7 +139,9 @@ const initialNodes: Node[] = [
position: { x: 50, y: 50 }, position: { x: 50, y: 50 },
parentNode: '5', parentNode: '5',
extent: 'parent', extent: 'parent',
style: { ...nodeStyle, width: 50, height: 100 }, width: 50,
height: 100,
style: { ...nodeStyle },
}, },
{ {
id: '5b', id: '5b',