16 lines
372 B
TypeScript
16 lines
372 B
TypeScript
export type ToolId = "select" | "pan";
|
|
|
|
export type InteractionMode =
|
|
| { type: "tool"; tool: ToolId }
|
|
| { type: "temporary-pan"; previousTool: ToolId };
|
|
|
|
export type ToolState = {
|
|
activeTool: ToolId;
|
|
interactionMode: InteractionMode;
|
|
};
|
|
|
|
export const initialToolState: ToolState = {
|
|
activeTool: "select",
|
|
interactionMode: { type: "tool", tool: "select" },
|
|
};
|