2.2.0 • Published 2 years ago
ng-zoom v2.2.0
✨ Features
- 👌 Zero-dependency
- 🧬 Perfect for dynamic content, mutation-agnostic — you can do whatever you want with images, it'll work
- ⚡️ Blazing fast — no matter if it's 10 images or 10,000
- 🤓 Powered by quirky math to precisely calculate everything and do the trick with only one transformation
- 🍦 Zero-configuration by default but extensible when you need it
- 🗿 Works flawlessly even on iOS Safari, in every orientation, with every image no matter the size and dimensions
🔑 License
🖥 Environment Support
- Angular
^13.0.0
📦 Installation
$ npm install ng-zoom
🔨 Usage
Import the ng-zoom module into the app.module.ts
file.
import { NgZoomModule } from 'ng-zoom';
@NgModule({
imports: [NgZoomModule],
})
export class AppModule {}
Use the ng-zoom
directive in your .html
files.
<img ng-zoom src="lake.png" alt="lake" />
⚙️ Configuration
Pass a NgZoomConfig
object to the module's forRoot
method.
import { NgZoomConfig, NgZoomModule } from 'ng-zoom';
const config: NgZoomConfig = {
backgroundColor: 'skyblue',
};
@NgModule({
imports: [NgZoomModule.forRoot(config)],
})
export class AppModule {}
🏷️ Config reference
Property | Type | Default | Description |
---|---|---|---|
backgroundColor | string | #ffffff | The background color of the wrapper element. |
scaleUp | boolean | true | Defines if an element should be scaled up when zooming or maintain its original size. |
padding | number | 20 | Padding in pixels |
duration | number | 300 | The duration of the zoom animation in milliseconds. |
2.2.0
2 years ago
2.1.0
2 years ago
2.0.3
2 years ago
2.0.2
2 years ago
2.0.4
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.9
2 years ago
1.0.8
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago