port more updates
This commit is contained in:
@@ -18,7 +18,7 @@
|
|||||||
custom: CustomNode
|
custom: CustomNode
|
||||||
};
|
};
|
||||||
|
|
||||||
const nodes = $state.raw([
|
let nodes = $state.raw([
|
||||||
{
|
{
|
||||||
id: '1',
|
id: '1',
|
||||||
type: 'custom',
|
type: 'custom',
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const edges = $state.raw([
|
let edges = $state.raw([
|
||||||
{
|
{
|
||||||
id: '1-2',
|
id: '1-2',
|
||||||
source: '1',
|
source: '1',
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<SvelteFlow {nodes} {edges} {nodeTypes} fitView>
|
<SvelteFlow bind:nodes bind:edges {nodeTypes} fitView>
|
||||||
<Controls />
|
<Controls />
|
||||||
<Background variant={BackgroundVariant.Dots} />
|
<Background variant={BackgroundVariant.Dots} />
|
||||||
<MiniMap />
|
<MiniMap />
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { writable } from 'svelte/store';
|
|
||||||
import {
|
import {
|
||||||
SvelteFlow,
|
SvelteFlow,
|
||||||
Controls,
|
Controls,
|
||||||
@@ -17,7 +16,7 @@
|
|||||||
targetPosition: Position.Left
|
targetPosition: Position.Left
|
||||||
};
|
};
|
||||||
|
|
||||||
const nodes = writable([
|
let nodes = $state.raw([
|
||||||
{
|
{
|
||||||
id: '0',
|
id: '0',
|
||||||
position: { x: 0, y: 150 },
|
position: { x: 0, y: 150 },
|
||||||
@@ -29,7 +28,7 @@
|
|||||||
{ id: 'C', position: { x: 250, y: 300 }, data: { label: 'C' }, ...nodeDefaults }
|
{ id: 'C', position: { x: 250, y: 300 }, data: { label: 'C' }, ...nodeDefaults }
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const edges = writable([]);
|
let edges = $state.raw([]);
|
||||||
|
|
||||||
const isValidConnection: IsValidConnection = (connection) => connection.target === 'B';
|
const isValidConnection: IsValidConnection = (connection) => connection.target === 'B';
|
||||||
|
|
||||||
@@ -39,8 +38,8 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SvelteFlow
|
<SvelteFlow
|
||||||
{nodes}
|
bind:nodes
|
||||||
{edges}
|
bind:edges
|
||||||
fitView
|
fitView
|
||||||
minZoom={0.1}
|
minZoom={0.1}
|
||||||
maxZoom={2.5}
|
maxZoom={2.5}
|
||||||
|
|||||||
Reference in New Issue
Block a user