Spaces:
Running
Running
Download src/store/useCursorStore.ts from mrfakename/flow: direct link, hf CLI and curl.
- Browser
- Download file 347 Bytes
-
https://huggingface.co/spaces/mrfakename/flow/resolve/main/src/store/useCursorStore.ts
- Command line
-
hf download hf://spaces/mrfakename/flow/src/store/useCursorStore.ts
-
curl -L -o useCursorStore.ts https://huggingface.co/spaces/mrfakename/flow/resolve/main/src/store/useCursorStore.ts
347 Bytes
| import { create } from "zustand"; | |
| interface CursorState { | |
| x: number; | |
| y: number; | |
| zoom: number; | |
| set: (p: Partial<CursorState>) => void; | |
| } | |
| /** Kept separate from the canvas store so mouse moves never re-render the graph. */ | |
| export const useCursorStore = create<CursorState>((set) => ({ | |
| x: 0, | |
| y: 0, | |
| zoom: 1, | |
| set: (p) => set(p), | |
| })); | |