Merge branch 'next' of github.com:xyflow/xyflow into next

This commit is contained in:
moklick
2023-11-13 11:47:13 +01:00
5 changed files with 120 additions and 6 deletions
@@ -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>