Files
image-studio/view/canvas/cursor.ts
2026-07-03 10:16:34 +02:00

9 lines
356 B
TypeScript

import type { InteractionMode } from "@editor/tools";
import type { CanvasInputState } from "./useCanvasInput";
export function canvasCursorClass(interactionMode: InteractionMode, input: CanvasInputState) {
if (input.isPanning) return "cursor-grabbing";
if (interactionMode.type === "temporary-pan") return "cursor-grab";
return "cursor-default";
}