react-zoom-pan-pinch
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -58,2 +58,4 @@ import React, { Component } from 'react'; | ||
setComponents: (wrapperComponent: HTMLDivElement, contentComponent: HTMLDivElement) => void; | ||
setTransformState: (scale: number, positionX: number, positionY: number) => void; | ||
setCenter: () => void; | ||
applyTransformation: () => void; | ||
@@ -87,8 +89,8 @@ handleRef: () => void; | ||
declare const zoomIn: (contextInstance: ReactZoomPanPinchContext) => (step?: number, animationTime?: number, animationName?: keyof typeof animations) => void; | ||
declare const zoomOut: (contextInstance: ReactZoomPanPinchContext) => (step?: number, animationTime?: number, animationName?: keyof typeof animations) => void; | ||
declare const zoomIn: (contextInstance: ReactZoomPanPinchContext) => (step?: number, animationTime?: number, animationType?: keyof typeof animations) => void; | ||
declare const zoomOut: (contextInstance: ReactZoomPanPinchContext) => (step?: number, animationTime?: number, animationType?: keyof typeof animations) => void; | ||
declare const setTransform: (contextInstance: ReactZoomPanPinchContext) => (newPositionX: number, newPositionY: number, newScale: number, animationTime?: number, animationType?: keyof typeof animations) => void; | ||
declare const resetTransform: (contextInstance: ReactZoomPanPinchContext) => (animationTime?: number, animationType?: keyof typeof animations) => void; | ||
declare const centerView: (contextInstance: ReactZoomPanPinchContext) => () => void; | ||
declare const zoomToElement: (contextInstance: ReactZoomPanPinchContext) => (node: HTMLElement | string, animationTime?: number, animationName?: keyof typeof animations) => void; | ||
declare const centerView: (contextInstance: ReactZoomPanPinchContext) => (scale?: number | undefined, animationTime?: number, animationType?: keyof typeof animations) => void; | ||
declare const zoomToElement: (contextInstance: ReactZoomPanPinchContext) => (node: HTMLElement | string, scale?: number | undefined, animationTime?: number, animationType?: keyof typeof animations) => void; | ||
@@ -198,2 +200,6 @@ declare type ReactZoomPanPinchContext = typeof TransformContext.prototype; | ||
declare type SizeType = { | ||
width: number; | ||
height: number; | ||
}; | ||
declare type PositionType = { | ||
@@ -203,2 +209,7 @@ x: number; | ||
}; | ||
declare type StateType = { | ||
scale: number; | ||
positionX: number; | ||
positionY: number; | ||
}; | ||
declare type VelocityType = { | ||
@@ -230,2 +241,2 @@ velocityX: number; | ||
export { AnimationType, BoundsType, LibrarySetup, PositionType, ReactZoomPanPinchComponentHelpers, ReactZoomPanPinchContext, ReactZoomPanPinchHandlers, ReactZoomPanPinchProps, ReactZoomPanPinchRef, ReactZoomPanPinchState, TransformComponent, TransformWrapper, VelocityType, useTransformContext }; | ||
export { AnimationType, BoundsType, LibrarySetup, PositionType, ReactZoomPanPinchComponentHelpers, ReactZoomPanPinchContext, ReactZoomPanPinchHandlers, ReactZoomPanPinchProps, ReactZoomPanPinchRef, ReactZoomPanPinchState, SizeType, StateType, TransformComponent, TransformWrapper, VelocityType, useTransformContext }; |
{ | ||
"name": "react-zoom-pan-pinch", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Zoom and pan html elements in easy way", | ||
@@ -5,0 +5,0 @@ "author": "prc5", |
@@ -75,5 +75,5 @@ # react-zoom-pan-pinch | ||
<div className="tools"> | ||
<button onClick={zoomIn}>+</button> | ||
<button onClick={zoomOut}>-</button> | ||
<button onClick={resetTransform}>x</button> | ||
<button onClick={() => zoomIn()}>+</button> | ||
<button onClick={() => zoomOut()}>-</button> | ||
<button onClick={() => resetTransform()}>x</button> | ||
</div> | ||
@@ -80,0 +80,0 @@ <TransformComponent> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
309476
3386