New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-pinch-and-zoom

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-pinch-and-zoom

A react container component with pinch-to-zoom gesture interaction.

  • 1.2.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.6K
increased by0.51%
Maintainers
1
Weekly downloads
 
Created
Source

license

React Pinch and Zoom

A react container component with pinch-to-zoom gesture interaction.

Getting Started

Installing

  1. Install this package as dependency

    # pwd: ~/project/dir
    $ npm install react-pinch-and-zoom
    
  2. Import the component

    import PinchToZoom from 'react-pinch-and-zoom';
    
  3. Wrap the pinch-able component inside PinchToZoom component

    render() {
      return (
        <div className="container">
          <PinchToZoom>
            <img src={...}/> // child node should have intrinsic size
          </PinchToZoom>
        </div>
      );
    }
    

Project structure

./react-pinch-and-zoom (master)
├── docs               // compiled github demo page
├── lib                // compiled react component in commonjs module (git ignored)
├── package.json
├── server.js          // config local development server
└── src
    ├── PinchToZoom    // source code of react-pinch-and-zoom
    └── demo           // source code of github demo page

Develop on local machine

  1. Pull this repository
    # pwd: ~/development/dir
    $ git pull https://github.com/conradlo/react-pinch-and-zoom.git
    
  2. Install dependency
    $ cd react-pinch-and-zoom
    # pwd: ~/development/dir/react-pinch-and-zoom
    $ npm install
    
  3. Start local development server
    # pwd: ~/development/dir/react-pinch-and-zoom
    $ npm start
    
  4. Visit localhost:3000 and edit src/PinchToZoom/*
  5. Consult package.json for more npm script tasks

Production build

run npm run build will:

  1. transpile the component's source code /lib
  2. build and bundle the Github page /docs
# pwd: ~/development/dir/react-pinch-and-zoom
$ npm run build

Built With

  • Reactjs - A JavaScript library for building user interfaces
  • Sass - Syntactically Awesome Style Sheets
  • Webpack - JavaScript module bundler
  • Babel - JavaScript transpiler/compiler
  • Typescript - For extra type safety
  • eslint, tslint, prettier, vscode

Contributing

Please refer to CONTRIBUTING.md for details on code of conduct, and the process for submitting pull requests.

Versioning

This project uses SemVer for versioning. For the versions available, see the tags on this repository.

License

see the LICENSE file for details

Acknowledgments

Keywords

FAQs

Package last updated on 20 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc