refactor: move event handlers to own classes

This commit is contained in:
2025-12-02 16:58:31 +01:00
parent 669a2c7991
commit d178f812fb
5 changed files with 540 additions and 500 deletions

View File

@@ -53,6 +53,16 @@ export class GraphState {
edgeEndPosition = $state<[number, number] | null>();
addMenuPosition = $state<[number, number] | null>(null);
snapToGrid = $state(false);
showGrid = $state(true)
showHelp = $state(false)
cameraDown = [0, 0];
mouseDownNodeId = -1;
isPanning = $state(false);
isDragging = $state(false);
hoveredNodeId = $state(-1);
mousePosition = $state([0, 0]);
mouseDown = $state<[number, number] | null>(null);
activeNodeId = $state(-1);