feat: migrate some more stuff to svelte-5, mainly app settings
Some checks failed
Deploy to GitHub Pages / build_site (push) Failing after 4s

This commit is contained in:
2024-11-08 02:38:19 +01:00
parent 4f03f2af5a
commit 5421349c79
34 changed files with 375 additions and 165 deletions

View File

@@ -8,12 +8,7 @@ export function getGraphState() {
export class GraphState {
activeNodeId = $state(-1);
selectedNodes = $state(new Set<number>());
clearSelection() {
this.selectedNodes = new Set();
}
activeSocket = $state<Socket | null>(null);
hoveredSocket = $state<Socket | null>(null);
possibleSockets = $state<Socket[]>([]);
@@ -21,6 +16,10 @@ export class GraphState {
this.possibleSockets.map((s) => `${s.node.id}-${s.index}`),
));
clearSelection() {
this.selectedNodes = new Set();
}
}
export { colors } from "./colors";