add on mount to solve issues with func call before load

This commit is contained in:
2024-05-15 09:30:50 +02:00
parent f2d6bd1f8c
commit 517ef26598

View File

@@ -1,8 +1,11 @@
import dagre from '@dagrejs/dagre';
import { Position, type Node, type Edge } from '@xyflow/svelte';
import { onMount } from 'svelte';
const dagreGraph = new dagre.graphlib.Graph();
dagreGraph.setDefaultEdgeLabel(() => ({}));
onMount(() => {
dagreGraph.setDefaultEdgeLabel(() => ({}));
});
const nodeWidth = 250;
const nodeHeight = 250;