chore(examples): cleanup
This commit is contained in:
@@ -32,96 +32,96 @@ const nodeStyle = {
|
||||
const initialEdges: Edge[] = [];
|
||||
|
||||
const initialNodes: Node[] = [
|
||||
// {
|
||||
// id: '1',
|
||||
// type: 'defaultResizer',
|
||||
// data: { label: 'default resizer' },
|
||||
// position: { x: 0, y: 0 },
|
||||
// origin: [1, 1],
|
||||
// style: { ...nodeStyle },
|
||||
// },
|
||||
// {
|
||||
// id: '1a',
|
||||
// type: 'defaultResizer',
|
||||
// data: {
|
||||
// label: 'default resizer with min and max dimensions',
|
||||
// minWidth: 100,
|
||||
// minHeight: 80,
|
||||
// maxWidth: 200,
|
||||
// maxHeight: 200,
|
||||
// },
|
||||
// position: { x: 0, y: 60 },
|
||||
// width: 100,
|
||||
// height: 80,
|
||||
// style: { ...nodeStyle },
|
||||
// },
|
||||
// {
|
||||
// id: '1b',
|
||||
// type: 'defaultResizer',
|
||||
// data: {
|
||||
// label: 'default resizer with initial size and aspect ratio',
|
||||
// keepAspectRatio: true,
|
||||
// minWidth: 100,
|
||||
// minHeight: 60,
|
||||
// maxWidth: 400,
|
||||
// maxHeight: 400,
|
||||
// },
|
||||
// position: { x: 250, y: 0 },
|
||||
// width: 174,
|
||||
// height: 123,
|
||||
// style: {
|
||||
// ...nodeStyle,
|
||||
// },
|
||||
// },
|
||||
// {
|
||||
// id: '2',
|
||||
// type: 'customResizer',
|
||||
// data: { label: 'custom resize icon' },
|
||||
// position: { x: 0, y: 200 },
|
||||
// width: 100,
|
||||
// height: 60,
|
||||
// style: { ...nodeStyle },
|
||||
// },
|
||||
// {
|
||||
// id: '3',
|
||||
// type: 'verticalResizer',
|
||||
// data: { label: 'vertical resizer' },
|
||||
// position: { x: 250, y: 200 },
|
||||
// style: { ...nodeStyle },
|
||||
// },
|
||||
// {
|
||||
// id: '3a',
|
||||
// type: 'verticalResizer',
|
||||
// data: {
|
||||
// label: 'vertical resizer with min/maxHeight and aspect ratio',
|
||||
// minHeight: 50,
|
||||
// maxHeight: 200,
|
||||
// keepAspectRatio: true,
|
||||
// },
|
||||
// position: { x: 400, y: 200 },
|
||||
// height: 50,
|
||||
// style: { ...nodeStyle },
|
||||
// },
|
||||
// {
|
||||
// id: '4',
|
||||
// type: 'horizontalResizer',
|
||||
// data: {
|
||||
// label: 'horizontal resizer with aspect ratio',
|
||||
// keepAspectRatio: true,
|
||||
// minHeight: 20,
|
||||
// maxHeight: 80,
|
||||
// maxWidth: 300,
|
||||
// },
|
||||
// position: { x: 250, y: 300 },
|
||||
// style: { ...nodeStyle },
|
||||
// },
|
||||
// {
|
||||
// id: '4a',
|
||||
// type: 'horizontalResizer',
|
||||
// data: { label: 'horizontal resizer with maxWidth', maxWidth: 300 },
|
||||
// position: { x: 250, y: 400 },
|
||||
// style: { ...nodeStyle },
|
||||
// },
|
||||
{
|
||||
id: '1',
|
||||
type: 'defaultResizer',
|
||||
data: { label: 'default resizer' },
|
||||
position: { x: 0, y: 0 },
|
||||
origin: [1, 1],
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '1a',
|
||||
type: 'defaultResizer',
|
||||
data: {
|
||||
label: 'default resizer with min and max dimensions',
|
||||
minWidth: 100,
|
||||
minHeight: 80,
|
||||
maxWidth: 200,
|
||||
maxHeight: 200,
|
||||
},
|
||||
position: { x: 0, y: 60 },
|
||||
width: 100,
|
||||
height: 80,
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '1b',
|
||||
type: 'defaultResizer',
|
||||
data: {
|
||||
label: 'default resizer with initial size and aspect ratio',
|
||||
keepAspectRatio: true,
|
||||
minWidth: 100,
|
||||
minHeight: 60,
|
||||
maxWidth: 400,
|
||||
maxHeight: 400,
|
||||
},
|
||||
position: { x: 250, y: 0 },
|
||||
width: 174,
|
||||
height: 123,
|
||||
style: {
|
||||
...nodeStyle,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
type: 'customResizer',
|
||||
data: { label: 'custom resize icon' },
|
||||
position: { x: 0, y: 200 },
|
||||
width: 100,
|
||||
height: 60,
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
type: 'verticalResizer',
|
||||
data: { label: 'vertical resizer' },
|
||||
position: { x: 250, y: 200 },
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '3a',
|
||||
type: 'verticalResizer',
|
||||
data: {
|
||||
label: 'vertical resizer with min/maxHeight and aspect ratio',
|
||||
minHeight: 50,
|
||||
maxHeight: 200,
|
||||
keepAspectRatio: true,
|
||||
},
|
||||
position: { x: 400, y: 200 },
|
||||
height: 50,
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
type: 'horizontalResizer',
|
||||
data: {
|
||||
label: 'horizontal resizer with aspect ratio',
|
||||
keepAspectRatio: true,
|
||||
minHeight: 20,
|
||||
maxHeight: 80,
|
||||
maxWidth: 300,
|
||||
},
|
||||
position: { x: 250, y: 300 },
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '4a',
|
||||
type: 'horizontalResizer',
|
||||
data: { label: 'horizontal resizer with maxWidth', maxWidth: 300 },
|
||||
position: { x: 250, y: 400 },
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
type: 'defaultResizer',
|
||||
@@ -131,28 +131,28 @@ const initialNodes: Node[] = [
|
||||
height: 400,
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
// {
|
||||
// id: '5a',
|
||||
// type: 'defaultResizer',
|
||||
// data: {
|
||||
// label: 'Child with extent: parent',
|
||||
// },
|
||||
// position: { x: 50, y: 50 },
|
||||
// parentId: '5',
|
||||
// extent: 'parent',
|
||||
// width: 50,
|
||||
// height: 100,
|
||||
// style: { ...nodeStyle },
|
||||
// },
|
||||
// {
|
||||
// id: '5b',
|
||||
// type: 'defaultResizer',
|
||||
// data: { label: 'Child with expandParent' },
|
||||
// position: { x: 150, y: 100 },
|
||||
// parentId: '5',
|
||||
// expandParent: true,
|
||||
// style: { ...nodeStyle },
|
||||
// },
|
||||
{
|
||||
id: '5a',
|
||||
type: 'defaultResizer',
|
||||
data: {
|
||||
label: 'Child with extent: parent',
|
||||
},
|
||||
position: { x: 50, y: 50 },
|
||||
parentId: '5',
|
||||
extent: 'parent',
|
||||
width: 50,
|
||||
height: 100,
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '5b',
|
||||
type: 'defaultResizer',
|
||||
data: { label: 'Child with expandParent' },
|
||||
position: { x: 150, y: 100 },
|
||||
parentId: '5',
|
||||
expandParent: true,
|
||||
style: { ...nodeStyle },
|
||||
},
|
||||
{
|
||||
id: '5c',
|
||||
type: 'defaultResizer',
|
||||
|
||||
Reference in New Issue
Block a user