Add pan tool toolbar
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import type { InteractionMode } from "@editor/tools";
|
||||
import { isPanInteractionMode } 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";
|
||||
if (isPanInteractionMode(interactionMode)) return "cursor-grab";
|
||||
return "cursor-default";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user