Merge branch 'next' of github.com:xyflow/xyflow into next
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { writable } from 'svelte/store';
|
||||
import { SvelteFlow } from '@xyflow/svelte';
|
||||
import { Background, Controls, MiniMap, Panel, SvelteFlow } from '@xyflow/svelte';
|
||||
|
||||
import '@xyflow/svelte/dist/style.css';
|
||||
|
||||
@@ -10,7 +10,20 @@
|
||||
const nodes = writable(flowConfig.flowProps.nodes);
|
||||
const edges = writable(flowConfig.flowProps.edges);
|
||||
|
||||
const props = { ...flowConfig.flowProps, nodes, edges };
|
||||
const flowProps = { ...flowConfig.flowProps, nodes, edges };
|
||||
</script>
|
||||
|
||||
<SvelteFlow {...props} />
|
||||
<SvelteFlow {...flowProps}>
|
||||
{#if flowConfig.panelProps}
|
||||
<Panel {...flowConfig.panelProps} />
|
||||
{/if}
|
||||
{#if flowConfig.minimapProps}
|
||||
<MiniMap {...flowConfig.minimapProps} />
|
||||
{/if}
|
||||
{#if flowConfig.controlsProps}
|
||||
<Controls {...flowConfig.controlsProps} />
|
||||
{/if}
|
||||
{#if flowConfig.backgroundProps}
|
||||
<Background {...flowConfig.backgroundProps} />
|
||||
{/if}
|
||||
</SvelteFlow>
|
||||
|
||||
Reference in New Issue
Block a user