feat(editor): add tool interaction state
This commit is contained in:
15
editor/tools.ts
Normal file
15
editor/tools.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
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" },
|
||||
};
|
||||
Reference in New Issue
Block a user