Commit Graph

2 Commits

Author SHA1 Message Date
c3ce440d48 fix: resolve crop tool visual feedback issue
Simplified the crop tool overlay rendering to fix the issue where the crop area
was not visible during dragging. Changes:

- Removed overlayCanvas property and complex image preservation logic
- Added initialized flag for lazy initialization on first use
- Rewrote drawCropOverlay to use ctx.save()/restore() pattern
- Draw overlay elements directly on canvas context (darkened areas, border,
  rule of thirds grid, and resize handles)

The crop tool now properly displays the crop rectangle, handles, and overlay
during all interactions (defining, dragging, and resizing).

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 20:46:59 +01:00
841d6ca0a5 feat(phase-13): implement crop tool with visual guides and handles
Add comprehensive crop tool with visual guides, resize handles, and Apply/Cancel UI.

Features:
- Interactive crop area selection with drag-to-create
- 8 resize handles (corners and edges) for precise cropping
- Visual overlay with dimmed areas outside crop region
- Rule of thirds grid overlay for composition guidance
- Drag crop area to reposition
- Apply/Cancel buttons in tool options
- White border and handles for clear visibility

Changes:
- Created tools/crop-tool.ts with CropTool class
- Added crop tool to lib/tool-loader.ts
- Added Crop icon and button to tool palette with 'C' shortcut
- Added crop tool options UI in components/editor/tool-options.tsx
- Exported CropTool from tools/index.ts

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-21 19:54:05 +01:00