0.2.0 • Published 6 years ago

react-native-pinch-zoom-view v0.2.0

Weekly downloads
555
License
MIT
Repository
github
Last release
6 years ago

react-native-pinch-zoom-view

A pinch-to-zoom view for React Native. All the components wrapped in the view is scalable while still be able to respond to touch events.

Install

npm install react-native-pinch-zoom-view --save

Usage

require the react-native-pinch-zoom-view module and then use the <PinchZoomView> tag to wrap your content instead of <View>.

'use strict';
import React, { Component } from 'react';
import {
  AppRegistry,
  TextInput
} from 'react-native';
import PinchZoomView from 'react-native-pinch-zoom-view';

class APP extends Component {
  render() {
    return (
      <PinchZoomView>
        <TextInput style={{width: 100}}></TextInput>
      </PinchZoomView>
    );
  }
}

AppRegistry.registerComponent('APP', () => APP);

Properties

scalable

Values: true or false Default: true

In some cases, you may want to disable the pinch-zoom behaviour, just set scalable={false} on the component.

minScale

Type: Number Default: 0.5

Minimum scaling.

maxScale

Type: Number Default: 2

Maximum scaling.

Example

Check out a simple example in Example.

0.2.0

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago