Remove blob URL dead code and clean up more frontend code (#2199)

This commit is contained in:
Keavon Chambers
2025-01-14 13:08:47 -08:00
committed by GitHub
parent 1e62af88cd
commit 9ad6c31483
56 changed files with 107 additions and 247 deletions
+3 -11
View File
@@ -1,7 +1,7 @@
import { writable } from "svelte/store";
import { type Editor } from "@graphite/wasm-communication/editor";
import type { FrontendGraphOutput, FrontendGraphInput } from "@graphite/wasm-communication/messages";
import { type Editor } from "@graphite/editor";
import type { FrontendGraphOutput, FrontendGraphInput } from "@graphite/messages";
import {
type Box,
type FrontendClickTargets,
@@ -22,8 +22,7 @@ import {
UpdateNodeGraphTransform,
UpdateNodeThumbnail,
UpdateWirePathInProgress,
UpdateZoomWithScroll,
} from "@graphite/wasm-communication/messages";
} from "@graphite/messages";
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
export function createNodeGraphState(editor: Editor) {
@@ -44,7 +43,6 @@ export function createNodeGraphState(editor: Editor) {
inputTypeDescriptions: new Map<string, string>(),
nodeDescriptions: new Map<string, string>(),
nodeTypes: [] as FrontendNodeType[],
zoomWithScroll: false as boolean,
thumbnails: new Map<bigint, string>(),
selected: [] as bigint[],
transform: { scale: 1, x: 0, y: 0 },
@@ -136,12 +134,6 @@ export function createNodeGraphState(editor: Editor) {
return state;
});
});
editor.subscriptions.subscribeJsMessage(UpdateZoomWithScroll, (updateZoomWithScroll) => {
update((state) => {
state.zoomWithScroll = updateZoomWithScroll.zoomWithScroll;
return state;
});
});
return {
subscribe,