mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 10:23:41 +00:00
Implement comprehensive pattern rotation functionality: - Use Konva Transformer for native rotation UI with visual handles - Apply rotation transformation at upload time to stitch coordinates - Two-layer preview system: original (draggable/rotatable) and uploaded (locked) - Automatic position compensation for center shifts after rotation - PEN encoding/decoding with proper bounds calculation from decoded stitches - Comprehensive unit tests for rotation math and PEN round-trip - Restore original unrotated pattern on delete The rotation is applied by transforming stitch coordinates around the pattern's geometric center, then re-encoding to PEN format. Position adjustments compensate for center shifts caused by PEN encoder rounding to maintain visual alignment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| useMachineStore.ts | ||
| usePatternStore.ts | ||
| useUIStore.ts | ||