chore(svelte): cleanup examples
This commit is contained in:
@@ -133,7 +133,7 @@
|
||||
fitView
|
||||
fitViewOptions={{
|
||||
padding: 0.1,
|
||||
nodes: [{ id: '1' }]
|
||||
nodes: [{ id: '1' }, { id: '2' }, { id: '3' }]
|
||||
}}
|
||||
minZoom={0}
|
||||
maxZoom={Infinity}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user