many improvements

This commit is contained in:
Sam Lavigne
2023-08-24 16:07:27 -04:00
parent 09e4b5858c
commit f6b4e43509
5 changed files with 133 additions and 117 deletions

12
src/FitComp.svelte Normal file
View File

@ -0,0 +1,12 @@
<script>
import { useSvelteFlow } from "@xyflow/svelte";
import {nodes, auto} from './stores.js';
const { zoomIn, zoomOut, setZoom, fitView, setCenter, setViewport, getViewport, viewport } =
useSvelteFlow();
nodes.subscribe((n) => {
if ($auto) fitView();
});
</script>
<button>Fit</button>