mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2026-04-23 08:31:16 -04:00
chore: removes demo scene from documentation and instead refers to CodeSandbox example
This commit is contained in:
@@ -112,102 +112,7 @@ id?: string;
|
||||
```
|
||||
|
||||
## `initialScene` example
|
||||
Open this example in [CodeSandbox](https://codesandbox.io/p/sandbox/github/markmanx/isoflow/tree/main).
|
||||
|
||||
```js
|
||||
{
|
||||
icons: [
|
||||
{
|
||||
id: 'server',
|
||||
name: 'Server',
|
||||
url: 'https://isoflow-public.s3.eu-west-2.amazonaws.com/isopacks/isoflow/server.svg',
|
||||
isIsometric: true
|
||||
},
|
||||
{
|
||||
id: 'storage',
|
||||
name: 'Storage',
|
||||
url: 'https://isoflow-public.s3.eu-west-2.amazonaws.com/isopacks/isoflow/storage.svg',
|
||||
isIsometric: true
|
||||
},
|
||||
{
|
||||
id: 'laptop',
|
||||
name: 'Laptop',
|
||||
url: 'https://isoflow-public.s3.eu-west-2.amazonaws.com/isopacks/isoflow/laptop.svg',
|
||||
isIsometric: true
|
||||
}
|
||||
],
|
||||
nodes: [
|
||||
{
|
||||
id: 'database',
|
||||
icon: 'storage',
|
||||
label: 'Database',
|
||||
tile: {
|
||||
x: 2,
|
||||
y: -2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'server',
|
||||
icon: 'server',
|
||||
label: 'Server',
|
||||
labelHeight: 100,
|
||||
tile: {
|
||||
x: 2,
|
||||
y: 2
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'client',
|
||||
icon: 'laptop',
|
||||
label: 'Client',
|
||||
labelHeight: 100,
|
||||
tile: {
|
||||
x: -1,
|
||||
y: 0
|
||||
}
|
||||
}
|
||||
],
|
||||
connectors: [
|
||||
{
|
||||
id: 'connector1',
|
||||
anchors: [{ nodeId: 'server' }, { nodeId: 'database' }]
|
||||
},
|
||||
{
|
||||
id: 'connector2',
|
||||
style: ConnectorStyleEnum.DOTTED,
|
||||
width: 10,
|
||||
anchors: [
|
||||
{ nodeId: 'server' },
|
||||
{ tile: { x: -1, y: 2 } },
|
||||
{ nodeId: 'client' }
|
||||
]
|
||||
}
|
||||
],
|
||||
rectangles: [
|
||||
{
|
||||
id: 'rect1',
|
||||
from: {
|
||||
x: 3,
|
||||
y: 3
|
||||
},
|
||||
to: {
|
||||
x: 1,
|
||||
y: -3
|
||||
}
|
||||
}
|
||||
],
|
||||
textBoxes: [
|
||||
{
|
||||
id: 'text1',
|
||||
tile: {
|
||||
x: 1,
|
||||
y: -4
|
||||
},
|
||||
text: 'Backend'
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
A demo scene is hosted here on [CodeSandbox](https://codesandbox.io/p/sandbox/github/markmanx/isoflow/tree/main).
|
||||
|
||||
## Validation
|
||||
`initialScene` is validated before Isoflow renders the scene, and an error is thrown if the data is invalid.
|
||||
|
||||
Reference in New Issue
Block a user