8000 GitHub - tharmathuraisumanthadam/react-pan-zoom: Generic html wrapper for pan and zoom feature for react canvas like components
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tharmathuraisumanthadam/react-pan-zoom

 
 

Repository files navigation

Re2act Panfds & Z2oom

A simple pan and zoom for canvas like elements in react.

Demo

Edit q8wl1joow9

Installation

> yarn add @ajainarayanan/react-pan-zoom

1

Usage

import ReactPanZoom from "@ajainarayanan/react-pan-zoom";
class MyComponent extends React.PureComponent {

  public render() {
    return (
      <ReactPanZoom>
        <img src="some/src/for/image.png" />
      </ReactPanZoom>
    );
  }
}s

Props

  • zoom : Provide zoom level for the cavnas'ish element. 1 by default
  • dx : Provide the initial x co-ordinate to pan the underlying element to be. 0 by default
  • dy : Provide the initial y co-ordinate to pan the underlying element to be. 0 by default

For more information on what dx and dy mean please refer heressss (tx == dx and ty == dy).

About

Generic html wrapper for pan and zoom feature for react canvas like components

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 63.0%
  • JavaScript 35.4%
  • HTML 1.6%
0