1.0.5 • Published 5 years ago

angular-easy-zoom v1.0.5

Weekly downloads
19
License
-
Repository
-
Last release
5 years ago

EasyZoom

This library was generated with Angular CLI version 7.2.0.

Description

EasyZoom is crated based on jQuery Zoom and elevateZoom-plus, but it's fully angular based open source code. You can use your projects. Demo

Installation

To install this library, run:

npm i angular-easy-zoom

Usage

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

import { EasyZoomModule } from 'angular-easy-zoom';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    EasyZoomModule
  ],
  providers: [
	  
	],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once the library is imported, you can use its component in your Angular application:

<lib-easy-zoom
  [thumbImage]="smallImage" 
  [fullImage]="fullImage"
  [imageTitle]="Welcome"
  [enableLens]="true"
  [enableScrollZoom]="true"
  [lensWidth]="150"
  [lensHeight]="150"
  [circularLens]="true" 
  [maxZoomRatio]="5"
  [scrollStepSize]="0.1"
>
</lib-easy-zoom>

Options

OptionDefault valueDescription
thumbImagenone(Required) Thumbnail for zoom image.
Content CellContent Cell(Required) Original High quality image, it's required when user zoom the image.
imageTitlenoneAlt tag of image.
enableLensfalseIf enabled only a small portion around the mouse cursor will actually magnify instead of the entire image area.
enableScrollZoomfalseBoolean that toggles if the mouse wheel should be captured when hovering over the image to adjust magnification.
lensWidth100Width of the lens, if enabled.
lensHeight100Height of the lens, if enabled.
lensColor#000Border color of the lens, if enabled.
maxZoomRatio2Upper limit on how much zoom can be applied with scrollZoom enabled. See below for details.
minZoomRatiobaseRatioLower limit on how much zoom can be applied with scrollZoom enabled. See below for details.
circularLensfalseMake the lens circular instead of square. This will only look good if width and height are equal.

Donate!

Like my Work! Donate