0.1.0 • Published 5 years ago

img-zoom-in v0.1.0

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

ImgZoomIn

A Vue component used for Image zoom in of mouse movement area

Installation

$ npm i --save img-zoom-in

Usage

import imgZoomIn from 'img-zoom-in'


/*** In your code ***/

// basic usage
<ImgZoomIn :sImgSrc="imgSrc" />
 
// more options
<ImgZoomIn :sWidth="100" :sHeight="100" :mWidth="40" :mHeight="40" :bWidth="800" :bHeight="800" :sImgSrc="imgSrc" />

Options

PropsDescriptionTypeDefault value
sImgSrc(Required) Image that need to be zoom in (smaller Image)Stringnone
bImgSrcImage for zoomed in (Bigger Image). if not provide, same as sImgSrcStringnone
sWidthSmaller Image widthString or Number350
sHeightSmaller Image heightString or Number350
bWidthBigger Image widthString or Number800
bHeightBigger Image heightString or Number800
mWidthMouse Movement area widthString or Number175
mHeightMouse Movement area heightString or Number175
mBgColorMouse Movement area background colorString'#fede4f'

Explanation

The Zoomed In Image Size of Mouse Movement Area is: width = (bWidth / sWidth) mWidth & height = (bHeight / sHeight) mHeight