Commit graph

54 commits

Author SHA1 Message Date
Claude
3991058265
feat: Add smart min/max behavior to custom controls
Improve custom controls example with intelligent button behavior:
- Minus buttons disabled when at minimum (initial state)
- Plus buttons reset to minimum when at maximum
- Prevents going below min values
- Provides intuitive UX with disabled states

Implementation:
- Added computed signals: isZoomAtMin, isBrightnessAtMin, isBrightnessAtMax
- Created handler methods: handleZoomIn/Out, handleBrightnessIn/Out
- Handlers check limits and reset when appropriate
- Template binds [disabled] to computed signals

Benefits:
- Users can't accidentally go below minimum
- Easy reset from maximum with single click
- Clear visual feedback via disabled buttons
- Clean pattern for custom toolbar integration
2025-11-16 15:09:09 +00:00
Claude
757197fe26
feat: Add custom controls example with plus/minus buttons
Add comprehensive examples demonstrating custom zoom and brightness controls:
- New example in app.component.html showing plus/minus buttons for both features
- Updated README with custom controls section showing how to build custom UI
- Demonstrates disabling default controls and using public methods
- Useful for integrating controls into custom toolbars or layouts

Public methods used:
- zoomIn(value) / zoomOut(value) for zoom control
- brightnessIn() / brightnessOut() for brightness control
2025-11-16 14:45:10 +00:00
Claude
3809db173d
feat: Implement incremental brightness control
Update brightness toggle to increment by step amounts rather than jumping to max:
- Click repeatedly increases brightness by brightnessStep increments
- When max brightness is reached, clicking resets to normal (1.0)
- Provides smooth, granular control for detail visibility
- Updated README and examples to explain incremental behavior
2025-11-16 14:36:50 +00:00
Claude
f4d8717cc9
docs: Update credits to properly attribute complete contributor chain
- Added original author: Nikita Drozhzhin (drozhzhin-n-e/ngx-pinch-zoom)
- Added Angular 19/20 fork contributors: Konstantin Schütte and Björn Schmidt (medDV-GmbH)
- Structured credits to show development lineage: Original → Fork → Current
- Updated all three documentation files with consistent attribution
2025-11-16 09:49:14 +00:00
Claude
6e751e0dd5
docs: Clarify core logic attribution and modernization scope
Updated documentation to more accurately reflect what was preserved from the
original library versus what was rebuilt for Angular 20.

**Key Changes:**

**package.json:**
- Updated description to clarify "rebuilt with modern signals" rather than
  "complete rewrite"
- Emphasizes core logic is "adapted from original" with "extensive enhancements"

**README.md Credits Section:**
Now clearly separated into two parts:

1. **What's From the Original:**
   - Core pinch-to-zoom mathematics and transform algorithms (IvyPinch)
   - Touch and mouse gesture detection logic (Touches)
   - Original zoom/pan calculations and constraints

2. **What's New in This Version:**
   - Complete Angular 20 signals API migration
   - Professional architecture (models/, services/, containers/, presentational/)
   - Smart/Dumb component pattern
   - New features: brightness control, click-to-zoom
   - Service-based state management
   - 778 lines of JSDoc documentation

**CHANGELOG.md:**
- Changed from "Complete Rewrite" to "Major Modernization"
- Added explanation: "core zoom/pan mathematics from the original library have
  been preserved and enhanced, while the Angular implementation has been
  completely rebuilt"
- Credits section now explicitly lists what was retained from original

**Library README.md:**
- Added "Core Logic Attribution" section
- Added "Modernization & New Features" section
- Clearer separation of original work vs new work

**Rationale:**

This is more accurate and gives proper credit to the original developers for
their excellent core zoom algorithms while still highlighting the significant
work done to:
- Migrate to Angular 20 signals
- Redesign the architecture
- Add new features (brightness, click-to-zoom)
- Add comprehensive documentation

The core math and gesture detection logic from Nikita Drozhzhin's original
work remains the foundation, enhanced with modern Angular patterns and new
capabilities.
2025-11-16 09:20:42 +00:00
Claude
97a68341ff
chore: Add @brianpooe scope to package name
Updated package name from `ngx-pinch-zoom` to `@brianpooe/ngx-pinch-zoom`
to properly scope the package under the @brianpooe npm organization.

**Changes:**

- projects/ngx-pinch-zoom/package.json: name → @brianpooe/ngx-pinch-zoom
- README.md: All import examples updated to use scoped package name
- CHANGELOG.md: Installation command updated
- projects/ngx-pinch-zoom/README.md: Import examples updated
- ivypinch.ts: Deprecation notice updated with scoped package name
- touches.ts: Deprecation notice updated with scoped package name

Library builds successfully as @brianpooe/ngx-pinch-zoom.
2025-11-16 09:15:54 +00:00
Claude
40fac72bc0
docs: Update ownership, credits, and architecture documentation
This commit updates all documentation to reflect the complete Angular 20 rewrite
and establishes proper attribution for the original library authors.

**Package Changes:**

1. **package.json**
   - Changed name from @meddv/ngx-pinch-zoom to ngx-pinch-zoom
   - Updated author to Brian Pooe
   - Removed contributors (moved to Credits section in docs)
   - Updated repository URLs to brianpooe/ngx-pinch-zoom
   - Enhanced description highlighting modern architecture
   - Added keywords: Angular signals, smart components, anomaly detection

2. **Main README.md**
   - Updated all import examples from @meddv/ngx-pinch-zoom to ngx-pinch-zoom
   - Added comprehensive Architecture section with folder structure
   - Added Design Patterns section (Smart/Dumb, Services, Signals, DI)
   - Added detailed Credits section acknowledging original authors:
     * Nikita Drozhzhin - Original creator
     * Konstantin Schütte - Angular 19 fork maintainer
     * Björn Schmidt - Angular 19 fork contributor
   - Updated GitHub issues link to brianpooe repository

3. **CHANGELOG.md**
   - Updated version date to 2025-11-16
   - Changed title to "Complete Rewrite: Angular 20 + Professional Architecture"
   - Reorganized features to highlight new capabilities:
     * Click to Zoom for anomaly detection
     * Brightness Control
     * Professional Architecture
     * Smart/Dumb Components
   - Added Architecture Changes section with folder structure
   - Added comprehensive Credits section with original authors
   - Updated migration guide npm install command

4. **Library README.md** (projects/ngx-pinch-zoom/README.md)
   - Complete rewrite with focus on architecture and quality
   - Added detailed folder structure documentation
   - Added Design Patterns section explaining:
     * Smart/Dumb Component Pattern
     * Service-Based Architecture
     * Signal-Based Reactivity
     * Modern Dependency Injection
   - Added Code Quality section (778 lines JSDoc, strict mode, etc.)
   - Added Use Cases section (anomaly detection, medical imaging, etc.)
   - Added Credits section with full attribution

5. **Deprecated Re-export Files**
   - Updated @deprecated comments in ivypinch.ts and touches.ts
   - Changed import examples from @meddv/ngx-pinch-zoom to ngx-pinch-zoom

**Key Documentation Themes:**

- Emphasizes this is a **complete rewrite**, not just an update
- Proper attribution to original authors in Credits sections
- Highlights professional Angular architecture patterns
- Documents the clean folder structure (models/, services/, components/)
- Explains smart/dumb component pattern explicitly
- Shows real-world use cases (anomaly detection, defect inspection)

All references to @meddv and medDV-GmbH have been removed from ownership
positions and properly attributed in Credits sections.
2025-11-16 09:13:35 +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
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
8cdeea738d
feat: Upgrade to Angular 20 with signals and comprehensive modernization
This is a major update that modernizes the ngx-pinch-zoom library with Angular 20
and the signals API, while removing unnecessary dependencies and bloat.

## Major Changes

### Angular 20 + Signals Migration
- Upgraded all Angular dependencies to 20.0.0
- Migrated all @Input() properties to input() signals
- Migrated all @Output() EventEmitters to output() signals
- Converted component getters to computed() signals
- Implemented effects for reactive property changes
- Updated to use inject() for dependency injection

### Removed Bloat
- Removed Cypress testing framework and all related files
- Removed Karma/Jasmine testing infrastructure
- Removed ESLint and unnecessary linting dependencies
- Removed polyfills.ts (not needed for modern browsers)
- Removed all *.spec.ts test files
- Cleaned up configuration files

### TypeScript & Build Improvements
- Updated to TypeScript 5.8 with strict mode enabled
- Fixed all strict mode type errors in touches.ts and ivypinch.ts
- Updated tsconfig with modern settings (bundler module resolution)
- Simplified angular.json configuration
- Updated to latest ng-packagr (20.0.0)

### Documentation
- Complete rewrite of README.md with Angular 20 examples
- Added CONTRIBUTING.md with comprehensive maintainer guide
- Added CHANGELOG.md documenting all changes
- Included migration guide and architecture documentation
- Added usage examples with signals

### Dependencies Updated
- @angular/*: 19.0.0 → 20.0.0
- typescript: 5.5.4 → 5.8.0
- rxjs: 7.5.2 → 7.8.0
- ng-packagr: 19.0.0 → 20.0.0
- prettier: 2.7.1 → 3.0.0
- And many more...

## Files Changed
- Modified: pinch-zoom.component.ts (signals migration)
- Modified: ivypinch.ts (type safety improvements)
- Modified: touches.ts (strict mode fixes)
- Modified: package.json (simplified dependencies)
- Modified: angular.json (simplified configuration)
- Modified: tsconfig.json (modern settings)
- Added: CONTRIBUTING.md, CHANGELOG.md
- Removed: Cypress, Karma, ESLint configs and files

## Breaking Changes
- Requires Angular 20.0.0+
- Requires TypeScript 5.8.0+
- Requires Node.js 18.19.1+
- Computed properties must be called as functions: component.scale()

## Testing
- Library builds successfully with no errors
- All TypeScript strict mode errors resolved
- Ready for manual testing with demo app

BREAKING CHANGE: This version requires Angular 20+ and TypeScript 5.8+
2025-11-15 14:18:05 +00:00
Manuel Heidrich
05d166bca2
Update package to support Angular 20 (#61)
* Set angular peer dependencies to 19 or higher

* Update readme
2025-06-05 14:36:25 +02:00
Björn Schmidt
e10cae08a2 feat: #58 - added zoomChanged eventemitter as output 2025-06-04 11:30:08 +02:00
Björn Schmidt
b32ff3906b doc: #57 - documentation is now more accurate 2025-06-04 09:22:18 +02:00
Manuel Heidrich
1ec35a96d5
Implement zoom in and out methods (#60) 2025-06-04 08:58:47 +02:00
Björn Schmidt
227a3373d3 feat: Angular 19 Support, Switched to Standalone Component 2024-12-11 09:13:24 +01:00
Björn Schmidt
380a7b833f Updated readme 2023-05-09 18:13:22 +02:00
Tobias
df1a3b7431 updated dependencies to angular 14 and version bump 2022-08-01 16:37:33 +02:00
Konstantin Schütte
ec9b2c163a format all files with prettier 2022-02-07 13:46:52 +01:00
Nikita Drozhzhin
411ebd0f3a Update README.md 2021-07-07 11:48:02 +03:00
Nikita Drozhzhin
4b26c14fa6 Update readme 2021-07-06 22:02:47 +03:00
Nikita Drozhzhin
0a4055fd60 Update README.md 2021-07-06 21:57:58 +03:00
Nikita Drozhzhin
0023cf5db7 Update Readme 2021-06-27 13:03:24 +03:00
Nikita Drozhzhin
8df825b8e0 Update README.md 2021-06-27 12:57:52 +03:00
Nikita Drozhzhin
13c9150750 Update README.md 2021-02-05 10:55:01 +03:00
Nikita Drozhzhin
14ed79f0ec Angular 11 2021-02-05 10:53:57 +03:00
Nikita Drozhzhin
e999156c99 Update README.md 2020-03-31 09:05:57 +03:00
Nikita Drozhzhin
40be3ced1c Update README.md 2020-03-31 09:02:23 +03:00
Nikita Drozhzhin
ece8e6bc23 New features: autoHeight, wheelZoomFactor, draggableImage 2019-12-30 10:57:00 +03:00
Nikita Drozhzhin
b5c70ec492 Wheel handler and new zoom limit 2019-12-17 11:22:55 +03:00
Nikita Drozhzhin
fb4d45af8b Update README.md 2019-12-11 11:41:34 +03:00
Nikita Drozhzhin
dc86a4672b Fix event call 2019-12-11 11:31:51 +03:00
Nikita Drozhzhin
9b4311d85b New properties 2019-12-04 10:56:10 +03:00
Nikita Drozhzhin
3f341372ad v2.0.0 and angular 8 2019-11-21 11:15:04 +03:00
Nikita Drozhzhin
dae7e6e964 Property: disable zoom 2019-08-21 16:51:29 +03:00
Nikita Drozhzhin
50d439320d
Update README.md 2019-06-25 15:47:15 +03:00
Nikita Drozhzhin
c8a8fdce93 License and readme update 2019-02-19 09:28:32 +03:00
Nikita Drozhzhin
2c1b75c449 Angular update 2019-02-19 09:23:37 +03:00
drozhzhin-n-e
25ae71fb52 Merging 2018-08-08 12:16:40 +03:00
drozhzhin-n-e
3c8df114a4 v1.2.0 2018-08-08 12:14:48 +03:00
drozhzhin-n-e
41bc0d3eac
Update README.md 2018-07-16 11:09:40 +03:00
drozhzhin-n-e
c63ad3ffbf
Update README.md 2018-07-16 10:53:56 +03:00
drozhzhin-n-e
0741baf721
Update README.md 2018-07-15 11:17:09 +03:00
drozhzhin-n-e
6e27894efd MERGING 2018-07-15 11:11:20 +03:00
drozhzhin-n-e
441855ef91 v1.1.0 2018-07-15 11:08:27 +03:00
drozhzhin-n-e
38a6b2678b
Update README.md 2018-05-15 16:11:10 +03:00
drozhzhin-n-e
0eb65d7250
Update README.md 2018-05-15 15:57:46 +03:00
drozhzhin-n-e
1866958ae8 update readme 2018-04-14 16:29:30 +03:00
drozhzhin-n-e
462eefeb94 v1.0 2018-04-14 15:49:46 +03:00
drozhzhin-n-e
7667e4d6c4 readme: added demo animation 2018-04-13 13:45:32 +03:00
drozhzhin-n-e
30279219be readme: added demo animation 2018-04-13 13:42:27 +03:00