react-native-view-transformer
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -21,2 +21,6 @@ 'use strict'; | ||
static Rect = Rect; | ||
static getTransform = getTransform; | ||
constructor(props) { | ||
@@ -53,3 +57,2 @@ super(props); | ||
this.cancelAnimation = this.cancelAnimation.bind(this); | ||
this.debug = this.debug.bind(this); | ||
this.contentRect = this.contentRect.bind(this); | ||
@@ -124,6 +127,10 @@ this.transformedContentRect = this.transformedContentRect.bind(this); | ||
this.gestureResponder = createResponder({ | ||
onStartShouldSetResponder: (evt, gestureState) => true, | ||
onStartShouldSetResponder: (evt, gestureState) => { | ||
return true; | ||
}, | ||
onMoveShouldSetResponder: this.handleMove, | ||
onResponderMove: this.handleMove, | ||
onResponderGrant: ((evt) => { | ||
this.props.onTransformStart && this.props.onTransformStart(); | ||
this.setState({responderGranted: true}); | ||
@@ -146,2 +153,9 @@ }).bind(this), | ||
NativeModules.UIManager.measure(handle, ((x, y, width, height, pageX, pageY) => { | ||
if(typeof this.props.pageX === 'number') { | ||
pageX = this.props.pageX; | ||
} | ||
if(typeof this.props.pageY === 'number') { | ||
pageY = this.props.pageY; | ||
} | ||
this.setState({ | ||
@@ -319,3 +333,3 @@ width: width, | ||
}); | ||
if(handled) { | ||
if (handled) { | ||
return; | ||
@@ -416,6 +430,4 @@ } | ||
debug() { | ||
console.log('------debug------'); | ||
console.log('state=' + JSON.stringify(this.state)); | ||
console.log('-------end-------'); | ||
setTransform(transform) { | ||
this.setState(transform); | ||
} | ||
@@ -422,0 +434,0 @@ } |
{ | ||
"name": "react-native-view-transformer", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "`react-native-view-transformer` is a pure JavaScript RN component that makes **ANY** views transformable using gestures like pinch, double tap or pull, as below shows:", | ||
@@ -5,0 +5,0 @@ "main": "library/index.js", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
31315
946
0