chore(svelte): cleanup examples
This commit is contained in:
@@ -133,7 +133,7 @@
|
|||||||
fitView
|
fitView
|
||||||
fitViewOptions={{
|
fitViewOptions={{
|
||||||
padding: 0.1,
|
padding: 0.1,
|
||||||
nodes: [{ id: '1' }]
|
nodes: [{ id: '1' }, { id: '2' }, { id: '3' }]
|
||||||
}}
|
}}
|
||||||
minZoom={0}
|
minZoom={0}
|
||||||
maxZoom={Infinity}
|
maxZoom={Infinity}
|
||||||
|
|||||||
@@ -32,9 +32,21 @@
|
|||||||
const edges = writable([]);
|
const edges = writable([]);
|
||||||
|
|
||||||
const isValidConnection: IsValidConnection = (connection) => connection.target === 'B';
|
const isValidConnection: IsValidConnection = (connection) => connection.target === 'B';
|
||||||
|
|
||||||
|
const defaultEdgeOptions = {
|
||||||
|
animated: true
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SvelteFlow {nodes} {edges} fitView minZoom={0.1} maxZoom={2.5} {isValidConnection}>
|
<SvelteFlow
|
||||||
|
{nodes}
|
||||||
|
{edges}
|
||||||
|
fitView
|
||||||
|
minZoom={0.1}
|
||||||
|
maxZoom={2.5}
|
||||||
|
{isValidConnection}
|
||||||
|
{defaultEdgeOptions}
|
||||||
|
>
|
||||||
<Controls />
|
<Controls />
|
||||||
<Background variant={BackgroundVariant.Dots} />
|
<Background variant={BackgroundVariant.Dots} />
|
||||||
</SvelteFlow>
|
</SvelteFlow>
|
||||||
|
|||||||
Reference in New Issue
Block a user