1.1.4 • Published 3 days ago

@complat/react-svg-file-zoom-pan v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 days ago

React Svg File Zoom Pan

You can use this package in your react.js for:

  1. display an external SVG file / SVG string as a react.js component.

  2. zoom & pan the SVG using D3.js.

1. INSTALL

$ yarn add react-svg-file-zoom-pan

2. GETTING STARTED

run storybook to see demo
$ yarn install
$ yarn start
usage

svgPath: an URL, which is the link of your external SVG file.

svg: a string, which is the SVG content

Please input via svgPath or svg.

duration: a number, which is the time of the transition to the original SVG size when double-clicking.

resize: a bool, which set wheter you want to set SVG attributes to width: '100%', height: '100%'

3. TEST

unit tests

$ yarn test

end-to-end tests

$ yarn start
$ yarn e2e

4. LICENSE

LICENSE

5. REFERENCE

http://bl.ocks.org/sgruhier/1d692762f8328a2c9957

http://bl.ocks.org/mbostock/1014829

http://stackoverflow.com/questions/21209549/embed-and-refer-to-an-external-svg-via-d3-and-or-javascript

1.1.4

3 days ago

1.1.4-beta

3 days ago

1.1.4-beta.1

3 days ago

1.1.3-alpha.1

5 months ago

1.1.3-alpha.2

5 months ago

1.1.3

5 months ago

1.1.2

6 months ago

1.1.1

11 months ago

1.1.0

1 year ago

1.1.0-alpha.1

1 year ago

1.1.1-rc0

11 months ago

1.1.0-alpha.0

1 year ago

1.0.15

1 year ago

1.0.15-alpha.0

1 year ago

1.0.15-alpha.1

1 year ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.11

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago