diff --git a/bun.lockb b/bun.lockb index cc27caf..e5eb4ca 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 8936432..2a7260d 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@ruby/wasm-wasi": "^2.6.2", "katex": "^0.16.11", "lodash": "^4.17.21", + "preact-router": "^4.1.2", "vite-plugin-wasm": "^3.3.0" } } diff --git a/src/algorithms/flussi-su-grafi/View.jsx b/src/algorithms/flussi-su-grafi/View.jsx index a232f72..dd5f538 100644 --- a/src/algorithms/flussi-su-grafi/View.jsx +++ b/src/algorithms/flussi-su-grafi/View.jsx @@ -20,18 +20,21 @@ export const View = ({}) => { { id: id1, label: '1', + balance: 0, x: 100 + Math.random() * 500, y: 100 + Math.random() * 300, }, { id: id2, label: '2', + balance: 0, x: 100 + Math.random() * 500, y: 100 + Math.random() * 300, }, { id: id3, label: '3', + balance: 0, x: 100 + Math.random() * 500, y: 100 + Math.random() * 300, }, diff --git a/src/components/GraphInput.jsx b/src/components/GraphInput.jsx index 16e011f..d401268 100644 --- a/src/components/GraphInput.jsx +++ b/src/components/GraphInput.jsx @@ -56,6 +56,7 @@ export const GraphInput = ({ graph, setGraph }) => { { id: crypto.randomUUID(9).split('-')[0], label: '?', + balance: 0, x, y, }, @@ -193,7 +194,7 @@ export const GraphInput = ({ graph, setGraph }) => { ))}