Commit graph

6 commits

Author SHA1 Message Date
Claude
dcc0f95818
docs: Add comprehensive click-to-zoom documentation
Add real-world implementation example of click-to-zoom feature to maintainer documentation:

**IMPLEMENTATION_GUIDE.md:**
- Complete step-by-step implementation guide showing how click-to-zoom was added
- Explains each component (input signals, IvyPinch method, template, CSS)
- Includes code snippets from actual implementation
- Shows real-world usage for anomaly detection use case
- Provides testing checklist

**docs/README.md:**
- Added click-to-zoom to "Where do I find...?" quick reference table
- Added to "How do I...?" task guide
- Helps maintainers quickly locate click-to-zoom documentation

This serves as a template for future feature additions and helps maintainers understand how to add similar interactive features to the library.
2025-11-15 16:43:32 +00:00
Claude
1b7ed5adff
feat: Add click-to-zoom functionality for precise inspection
Implement click-to-zoom feature perfect for anomaly detection and defect inspection workflows:

**New Input Signals:**
- enableClickToZoom: Enable/disable click-to-zoom (default: false)
- clickToZoomScale: Target zoom scale when clicking (default: 2.5)

**Implementation:**
- Click any point on image to zoom to that exact location
- Click again to zoom out back to original view
- Cursor changes to zoom-in icon when feature is enabled
- Smooth animated transitions
- Respects zoom limits (min/max scale)
- Works alongside existing touch/pinch zoom

**Use Cases:**
- Anomaly detection: Click suspicious areas to examine closely
- Defect inspection: Quickly zoom to specific spots
- Detail review: Fast workflow for inspecting multiple points

**Technical Details:**
- Added IvyPinch.zoomToPoint(clientX, clientY, targetScale) method
- Calculates click position relative to element bounds
- Applies zoom transform centered on clicked point
- Component wrapper method handles event and configuration
- CSS cursor feedback for better UX

Updated documentation with usage examples and testing scenarios.
2025-11-15 16:39:01 +00:00
Claude
c0546dbf46
style: Apply prettier formatting
Apply consistent code formatting with prettier to all project files
2025-11-15 16:14:34 +00:00
Claude
5194dde20b
docs: Add brightness control documentation
Document the new brightness control feature across all documentation:
- Update README.md with brightness examples and API documentation
- Add brightness control to QUICK_REFERENCE.md signal architecture
- Include brightness in testing scenarios and configuration tests
- Document new input signals: enableBrightnessControl, brightnessStep, minBrightness, maxBrightness
- Document new output signal: brightnessChanged
- Document new methods: brightnessIn(), brightnessOut(), resetBrightness()
- Document new computed signals: brightness(), isBrightnessControl(), isBrightnessAtMin(), isBrightnessAtMax()
- Add CSS filter effects pattern example to QUICK_REFERENCE.md
2025-11-15 16:14:26 +00:00
Claude
76949aaf48
docs: Convert all diagrams to Mermaid.js with GitHub dark mode colors
Updated all text-based diagrams to use Mermaid.js syntax with colors
optimized for GitHub dark mode viewing.

Changes:
- QUICK_REFERENCE.md: 2 diagrams converted
  • Data Flow (graph LR with color-coded stages)
  • Touch Event Flow (flowchart TD with detailed state tracking)

- ARCHITECTURE.md: 6 diagrams converted
  • High-Level Architecture (graph TB with subgraphs)
  • Complete User Interaction Flow (sequenceDiagram)
  • Signal Reactivity Flow (flowchart TD)
  • Gesture Detection State Machine (stateDiagram-v2)
  • Component Lifecycle (flowchart TD with feedback loops)
  • Event Listener Lifecycle (flowchart TD)

- docs/README.md: 3 diagrams converted
  • The Big Picture (flowchart TD)
  • Component Hierarchy (graph TD)
  • Data Flow (flowchart TD)

Color Palette (GitHub dark mode optimized):
- Blue (#58a6ff): Logic, calculations, core functions
- Green (#3fb950): Success states, event handlers, initialization
- Yellow/Orange (#d29922): Computed signals, state updates
- Purple (#a371f7): User actions, signals, reactivity
- Pink (#db61a2): Events, callbacks, emissions
- Red (#f85149): DOM updates, destruction, browser events

Benefits:
 Interactive diagrams render on GitHub
 Consistent color coding across all documentation
 Better readability in dark mode
 Professional visual presentation
 Easier to understand complex flows
2025-11-15 15:41:12 +00:00
Claude
0d933efbf1
docs: Add comprehensive maintainer documentation
Added complete documentation suite for library maintainers:

Documentation Files:
- docs/README.md - Documentation index and learning paths
- docs/QUICK_REFERENCE.md - Fast lookup guide with code locations
- docs/ARCHITECTURE.md - Deep technical dive into system design
- docs/IMPLEMENTATION_GUIDE.md - Step-by-step examples for features/fixes

Enhanced Code Readability:
- ivypinch.improved.ts - Heavily commented reference version
  - 800+ lines of inline documentation
  - Section-organized code structure
  - Mathematical formulas explained
  - Every state variable documented
  - Method purposes and algorithms detailed

Documentation Coverage:
 Component architecture and data flow
 Signal-based reactivity patterns
 Transform mathematics with formulas
 Touch gesture detection algorithms
 Event system and state machines
 Constraint system (zoom/pan limits)
 Performance optimization techniques
 Common bug fixes with solutions
 Feature implementation examples
 Debugging techniques and tools
 Testing strategies

This documentation enables new maintainers to:
- Understand how the library works internally
- Add new features following established patterns
- Fix bugs efficiently with debugging guides
- Optimize performance with best practices
- Navigate the codebase quickly

For maintainers: Start with docs/README.md for learning paths
2025-11-15 15:22:38 +00:00