react-native-drawer-layout
Advanced tools
Comparing version 0.1.4 to 0.2.0
@@ -119,3 +119,3 @@ import React from 'react-native'; | ||
@autobind | ||
open(options={}) { | ||
openDrawer(options={}) { | ||
this._emitStateChanged(SETTLING); | ||
@@ -129,3 +129,3 @@ Animated.spring(this.state.openValue, {toValue: 1, bounciness: 0, restSpeedThreshold: 0.1, ...options}).start(() => { | ||
@autobind | ||
close(options={}) { | ||
closeDrawer(options={}) { | ||
this._emitStateChanged(SETTLING); | ||
@@ -220,19 +220,19 @@ Animated.spring(this.state.openValue, {toValue: 0, bounciness: 0, restSpeedThreshold: 1, ...options}).start(() => { | ||
if ((vx > 0 && moveX > THRESHOLD) || (vx >= VX_MAX) || isWithinVelocityThreshold && previouslyOpen && moveX > THRESHOLD) { | ||
this.open({velocity: vx}); | ||
this.openDrawer({velocity: vx}); | ||
} else if ((vx < 0 && moveX < THRESHOLD) || (vx < -VX_MAX) || isWithinVelocityThreshold && !previouslyOpen) { | ||
this.close({velocity: vx}); | ||
this.closeDrawer({velocity: vx}); | ||
} else if (previouslyOpen) { | ||
this.open(); | ||
this.openDrawer(); | ||
} else { | ||
this.close(); | ||
this.closeDrawer(); | ||
} | ||
} else { | ||
if ((vx < 0 && moveX < THRESHOLD) || (vx <= -VX_MAX) || isWithinVelocityThreshold && previouslyOpen && moveX < THRESHOLD) { | ||
this.open({velocity: -1 * vx}); | ||
this.openDrawer({velocity: -1 * vx}); | ||
} else if ((vx > 0 && moveX > THRESHOLD) || (vx > VX_MAX) || isWithinVelocityThreshold && !previouslyOpen) { | ||
this.close({velocity: -1 * vx}); | ||
this.closeDrawer({velocity: -1 * vx}); | ||
} else if (previouslyOpen) { | ||
this.open(); | ||
this.openDrawer(); | ||
} else { | ||
this.close(); | ||
this.closeDrawer(); | ||
} | ||
@@ -239,0 +239,0 @@ } |
{ | ||
"name": "react-native-drawer-layout", | ||
"version": "0.1.4", | ||
"version": "0.2.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
9352
0