feat(svelte) added onedgecreate function

This commit is contained in:
Peter
2023-11-28 15:48:19 +01:00
parent 1eea7209a3
commit 3f94dfa84c
7 changed files with 34 additions and 6 deletions
@@ -35,7 +35,8 @@ import type {
Node,
Edge,
FitViewOptions,
OnDelete
OnDelete,
OnEdgeCreate
} from '$lib/types';
import { createNodesStore, createEdgesStore } from './utils';
import { initConnectionProps, type ConnectionProps } from './derived-connection-props';
@@ -130,6 +131,7 @@ export const getInitialStore = ({
lib: readable<string>('svelte'),
onlyRenderVisibleElements: writable<boolean>(false),
onerror: writable<OnError>(devWarn),
ondelete: writable<OnDelete>(undefined)
ondelete: writable<OnDelete>(undefined),
onedgecreate: writable<OnEdgeCreate>(undefined)
};
};