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

@ -14,10 +14,13 @@
import NodeStore from "$lib/node-store/NodeStore.svelte";
import type { GraphManager } from "$lib/graph-interface/graph-manager";
import { setContext } from "svelte";
import { decodeNestedArray } from "@nodes/utils";
const nodeRegistry = new RemoteNodeRegistry("");
const runtimeExecutor = new MemoryRuntimeExecutor(nodeRegistry);
globalThis.decode = decodeNestedArray;
let res: Int32Array;
let graph = localStorage.getItem("graph")
@ -120,6 +123,8 @@
registry={nodeRegistry}
{graph}
bind:keymap
showGrid={$AppSettings?.showNodeGrid}
snapToGrid={$AppSettings?.snapToGrid}
settings={settings?.graph?.settings}
on:settings={handleSettings}
on:result={handleResult}