fix(tools): add modifier key support for advanced brush tools

TypeScript compilation fixes:
- Added modifier keys (altKey, ctrlKey, shiftKey, metaKey) to PointerState interface
- Updated all PointerState creations in canvas to include modifier keys
- Added 'smudge' and 'dodge' cursor definitions to tool store

Tool integration:
- Added 'clone', 'smudge', 'dodge' to drawing tools array in canvas
- Clone Stamp uses Alt+Click to set source point
- Dodge/Burn uses Alt key to toggle between dodge (lighten) and burn (darken) modes
- Smudge tool benefits from modifier key tracking for future enhancements

All tools now properly receive keyboard modifier state for advanced interactions.
Build verified successful with pnpm build.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-21 16:33:16 +01:00
parent 7f4d574c64
commit a9b6ca7578
3 changed files with 32 additions and 2 deletions

View File

@@ -52,6 +52,8 @@ export const useToolStore = create<ToolStore>()(
shape: 'crosshair',
crop: 'crosshair',
clone: 'crosshair',
smudge: 'crosshair',
dodge: 'crosshair',
blur: 'crosshair',
sharpen: 'crosshair',
};