项目作者: PARAGJYOTI

项目描述 :
Image Zooming library for react
高级语言: JavaScript
项目地址: git://github.com/PARAGJYOTI/react-zoomify.git
创建时间: 2016-08-31T20:46:42Z
项目社区:https://github.com/PARAGJYOTI/react-zoomify

开源协议:MIT License

下载


react-zoomify

An Image Zooming library for react
(best for e-commerce)

Installation

  1. npm install --save react-zoomify

Use Cases

mainly for e-commerce image zooming purpose

Pros :

  1. Bug free
  2. simple to use
  3. cool-animation
  4. multiple zooming
  5. fast (because it's react!)
  6. see the code and customize if you need.

For es6

  1. import ReactZoomify from 'react-zoomify'

For es5

  1. var ReactZoomify =require('react-zoomify')

API documentation

Props :

  1. width : number | width of the image , (height is not needed :-))
  2. magnification: number | magnification needed for the image
  3. s : number | dimension of the square-sized clipper
  4. zoomedImgLeft : number | the zoomed img position from left (absolute position)
  5. zoomedImgTop : number | zoomed img position from top (absolute position)
  6. and of-course
  7. src : string | the sourcepath for the image

Example

  1. render(){
  2. return <ReactZoomify
  3. width={300}
  4. src='../path/image.jpg'
  5. s={150}
  6. magnification={4}
  7. zoomedImgLeft={500}
  8. zoomedImgTop={100}
  9. ></ReactZoomify>