mirror of
https://github.com/jhbruhn/respira.git
synced 2026-01-27 10:23:41 +00:00
React-Konva Migration: - Create KonvaComponents.tsx with declarative components - Convert Grid, Origin, Hoop, Stitches, PatternBounds, and CurrentPosition to React components - Add React.memo and useMemo for performance optimization - Remove imperative layer manipulation (destroyChildren, add, batchDraw) - Remove backgroundLayerRef and patternLayerRef - Let React handle component lifecycle and updates - Improve performance through React's diffing algorithm Pattern Offset Persistence: - Add patternOffset field to CachedPattern interface - Update PatternCacheService.savePattern to accept and store offset - Modify useBrotherMachine to save offset when uploading pattern - Update resumedPattern state to include offset information - Restore cached pattern offset in App.tsx on resume - Add initialPatternOffset prop to PatternCanvas component - Pattern position now persists across page reloads and reconnections Benefits: - More maintainable and React-idiomatic code - Better performance with large patterns - Automatic cleanup and no memory leaks - Pattern positioning workflow preserved across sessions - Improved developer experience 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| useBrotherMachine.ts | ||