chore(svelte): cleanup examples

This commit is contained in:
moklick
2023-09-26 12:46:32 +02:00
parent 88e840ccc9
commit b3329253ed
2 changed files with 14 additions and 2 deletions

View File

@@ -133,7 +133,7 @@
fitView
fitViewOptions={{
padding: 0.1,
nodes: [{ id: '1' }]
nodes: [{ id: '1' }, { id: '2' }, { id: '3' }]
}}
minZoom={0}
maxZoom={Infinity}

View File

@@ -32,9 +32,21 @@
const edges = writable([]);
const isValidConnection: IsValidConnection = (connection) => connection.target === 'B';
const defaultEdgeOptions = {
animated: true
};
</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 />
<Background variant={BackgroundVariant.Dots} />
</SvelteFlow>