1.4.0 • Published 2 months ago

ng-magnizoom v1.4.0

Weekly downloads
24
License
MIT
Repository
github
Last release
2 months ago

Ng-Magnizoom

DEMO: Stackblitz

Getting Started

Step 1: Installing via NPM

npm install ng-magnizoom

Step 2: Importing the module

import { NgMagnizoomModule } from 'ng-magnizoom';

@NgModule({
  ...
  imports: [
    ... ,
    NgMagnizoomModule
  ],
  ...
})
export class AppModule {}

Usage

Use the ng-magnizoom component with the imageSrc input to render the image with zoom options.

...
  <ng-magnizoom
    zoomMode="LENS"
    imageSrc="/path/to">
  </ng-magnizoom>
...

Options

NameTypeDefaultTwo-way bindingDescription
imageSrcstring(required)-Image source (url)
zoomMode'LENS', 'COVER''COVER'-Mode
minZoomFactornumber1.2-Minimum zooming factor
maxZoomFactornumber3-Maximum zooming factor
imageStyle{ x: string: any; }--ngSytle for image canvas element
imageClassany-ngClass for image canvas element
zoomFactornumber2xcurrent zoom level (between minZoomFactor and maxZoomFactor)
lensSizeUnit'NORMALIZED', 'PIXEL''NORMALIZED'-'NORMALIZED' - between 0 and 1, 'PIXEL' - pixel value
lensSize{ width: number, height: number }{ width: 0.5, height: 0.5 }-The size of the lens in lensSizeUnit
zoomCenterUnit'NORMALIZED', 'PIXEL''NORMALIZED'-'NORMALIZED' - between 0 and 1, 'PIXEL' - pixel value
zoomCenter{ x: number, y: number } or undefinedundefinedxThe center of the zoom, undefined if not in zoom mode
updateOnMouseEventsbooleantrue-Whether or not the magnifier uses the mouse events
1.3.2

2 months ago

1.4.0

2 months ago

1.3.1

2 months ago

1.3.0

5 months ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

3 years ago

0.9.2

3 years ago

0.9.0

4 years ago

0.9.1

4 years ago

0.0.1

5 years ago