feat(svelte): add onError prop closes #3423

This commit is contained in:
moklick
2023-09-21 16:00:53 +02:00
parent 89b10863f2
commit 1a935de3f9
7 changed files with 36 additions and 35 deletions
+2 -7
View File
@@ -286,16 +286,12 @@ export function createStore(): SvelteFlowStore {
cancelConnection();
}
function onError(id: string, msg: string) {
console.log(msg);
}
return {
// state
...store,
// derived state
edgeTree: getEdgeTree(store, onError),
edgeTree: getEdgeTree(store),
connectionPath: getConnectionPath(store),
visibleNodes: getVisibleNodes(store),
markers: derived(
@@ -323,8 +319,7 @@ export function createStore(): SvelteFlowStore {
panBy,
updateConnection,
cancelConnection,
reset,
onError
reset
};
}