fix examples
This commit is contained in:
@@ -145,7 +145,7 @@
|
||||
let { updateNode } = $derived(useSvelteFlow());
|
||||
|
||||
function hideUnhide() {
|
||||
updateNode('hideunhide', (node) => ({ hidden: !node.hidden }));
|
||||
updateNode('hideunhide', (node) => ({ ...node, hidden: !node.hidden }));
|
||||
}
|
||||
|
||||
// $inspect(edges);
|
||||
|
||||
@@ -55,7 +55,10 @@
|
||||
const { updateNode } = $derived(useSvelteFlow());
|
||||
|
||||
const updateNodePosition = () => {
|
||||
updateNode('1', (node) => ({ position: { x: node.position.x + 10, y: node.position.y } }));
|
||||
updateNode('1', (node) => ({
|
||||
...node,
|
||||
position: { x: node.position.x + 10, y: node.position.y }
|
||||
}));
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user