reafactor(react/svelte): rename some util functions #3528

This commit is contained in:
moklick
2023-11-13 10:45:06 +01:00
parent b368b14b22
commit 90912a6c1a
19 changed files with 109 additions and 128 deletions
@@ -69,10 +69,10 @@
return null;
}
const type = event.dataTransfer.getData('application/svelteflow');
const position = svelteFlow.project({
const type = event.dataTransfer.getData('application/svelteflow') || 'default';
const position = svelteFlow.screenToFlowPosition({
x: event.clientX,
y: event.clientY - 40
y: event.clientY
});
const newNode: Node = {
id: `${Math.random()}`,
@@ -81,7 +81,7 @@
data: { label: `${type} node` }
};
svelteFlow.nodes.update((nds) => nds.concat(newNode));
nodes.update((nds) => nds.concat(newNode));
};
$: {