feat: add snapToGrid and showGrid settings

This commit is contained in:
2024-04-22 16:52:52 +02:00
parent ad197db873
commit 1de0094c85
25 changed files with 290 additions and 99 deletions

View File

@@ -18,6 +18,9 @@
export const keymap = createKeyMap([]);
setContext("keymap", keymap);
export let showGrid = false;
export let snapToGrid = false;
const updateSettings = debounce((s) => {
manager.setSettings(s);
}, 200);
@@ -43,4 +46,4 @@
const dispatch = createEventDispatcher();
</script>
<GraphEl graph={manager} />
<GraphEl graph={manager} settings={{ showGrid, snapToGrid }} />