# @duagentur/react-native-zoomable-view

> A view component for react-native with pinch to zoom, tap to move and double tap to zoom capability.

Latest version **1.0.6** (published 2018-07-11) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @duagentur/react-native-zoomable-view
pnpm add @duagentur/react-native-zoomable-view
yarn add @duagentur/react-native-zoomable-view
bun add @duagentur/react-native-zoomable-view
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2018-07-11 |
| First published | 2018-04-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 32.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 244 |
| Author | Simon Auer |
| Maintainers | simonerich |
| Keywords | react-native, react-component, ios, android, pinch-to-zoom, pinch, mobile, native, component, view, zoom, zoomable, double, tap |

## Links

- npm: https://www.npmjs.com/package/@duagentur/react-native-zoomable-view
- Repository: https://github.com/DuAgentur/react-native-zoomable-view
- Homepage: https://github.com/DuAgentur/react-native-zoomable-view#readme
- Issues: https://github.com/DuAgentur/react-native-zoomable-view/issues
- npm.io page: https://npm.io/package/@duagentur/react-native-zoomable-view

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.6 (latest) — 2018-07-11
- 1.0.5 — 2018-06-05
- 1.0.4 — 2018-06-05
- 1.0.3 — 2018-06-03
- 1.0.2 — 2018-05-01
- 1.0.1 — 2018-04-30
- 1.0.0 — 2018-04-24

## README

Warning: Not production ready yet!

# react-native-zoomable-view

A view component for react-native with pinch to zoom, tap to move and double tap to zoom capability.

Readme: 
Coming soon

## Props

### Events

| name | description | params | expected return |
| ---- | ----------- | ------ | --------------- |
| onStartShouldSetPanResponder | description | event, gestureState, zoomableViewEventObject, baseComponentResult | {boolean} whether panresponder should be set or not |
| onMoveShouldSetPanResponder | description | event, gestureState, zoomableViewEventObject, baseComponentResult | {boolean} whether panresponder should be set or not |
| onPanResponderGrant | description | event, gestureState, zoomableViewEventObject | void |
| onPanResponderEnd | Will be called when gesture ends | event, gestureState, zoomableViewEventObject | void |
| onPanResponderMove | Will be called when user moves while touching | event, gestureState, zoomableViewEventObject | void |
| onDoubleTap | Will be called, when user double taps the screen | event, gestureState, zoomableViewEventObject | void |
| onShiftingBefore | Will be called, when user taps and moves the view, but before our view movement work kicks in (so this is the place to interrupt movement, if you need to)  | event, gestureState, zoomableViewEventObject |  {boolean} if this returns false, ZoomableView will not process the shift, otherwise it will |
| onShiftingAfter | Will be called, when user taps and moves the view, but after the values have changed already | event, gestureState, zoomableViewEventObject | void |
| onShiftingEnd | Will be called, when user stops a tap and move gesture | event, gestureState, zoomableViewEventObject | void |
| onPinchMovementBefore | Will be called, while the user pinches the screen, but before our zoom work kicks in (so this is the place to interrupt zooming, if you need to) | event, gestureState, zoomableViewEventObject | {boolean} if this returns false, ZoomableView will not process the pinch, otherwise it will |
| onPinchMovementAfter | Will be called, while the user pinches the screen, but after the values have changed already | event, gestureState, zoomableViewEventObject | {boolean} if this returns false, ZoomableView will not process the pinch, otherwise it will |
| onPinchEnd | Will be called, when the pinch has ended | event, gestureState, zoomableViewEventObject | {boolean} if this returns false, ZoomableView will not process the pinch, otherwise it will |


## zoomableViewEventObject

The zoomableViewEventObject object is attached to every event and represents the current state of our zoomable view.
```json
   {
      zoomLevel: number,         // current level of zooming (usually a value between minZoom and maxZoom)
      offsetX: number,           // current offset left
      offsetY: number,           // current offset top
      lastScale: number,         // last zoom level (before we started the movement)
      lastX: number,             // last offset left (before we started the movement)
      lastY: number,             // last offset top (before we started the movement)
      lastMovePinch: boolean,    // information if a movement is going on
   }
```

---
_Source: https://npm.io/package/@duagentur/react-native-zoomable-view · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
