Socket
Socket
Sign inDemoInstall

react-native-modal

Package Overview
Dependencies
Maintainers
2
Versions
104
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-modal - npm Package Compare versions

Comparing version 5.1.0 to 5.1.1

2

package.json
{
"name": "react-native-modal",
"version": "5.1.0",
"version": "5.1.1",
"description": "An enhanced React-Native modal",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -178,3 +178,3 @@ import React, { Component } from "react";

const newOpacityFactor = 1 - accDistance / this.state.deviceWidth;
if (this.isSwipeDirectionAllowed(gestureState)) {
if (this.isSwipeDirectionAllowed(gestureState) && this.backdropRef) {
this.backdropRef.transitionTo({

@@ -197,6 +197,8 @@ opacity: this.props.backdropOpacity * newOpacityFactor

//Reset backdrop opacity and modal position
this.backdropRef.transitionTo(
{ opacity: this.props.backdropOpacity },
this.props.backdropTransitionInTiming
);
if (this.backdropRef) {
this.backdropRef.transitionTo(
{ opacity: this.props.backdropOpacity },
this.props.backdropTransitionInTiming
);
}
Animated.spring(this.state.pan, {

@@ -279,7 +281,10 @@ toValue: { x: 0, y: 0 },

this.transitionLock = true;
this.backdropRef.transitionTo(
{ opacity: this.props.backdropOpacity },
this.props.backdropTransitionInTiming
);
if (this.backdropRef) {
this.backdropRef.transitionTo(
{ opacity: this.props.backdropOpacity },
this.props.backdropTransitionInTiming
);
}
// This is for reset the pan position, if not modal get stuck

@@ -305,6 +310,8 @@ // at the last release position when you try to open it.

this.transitionLock = true;
this.backdropRef.transitionTo(
{ opacity: 0 },
this.props.backdropTransitionOutTiming
);
if (this.backdropRef) {
this.backdropRef.transitionTo(
{ opacity: 0 },
this.props.backdropTransitionOutTiming
);
}

@@ -311,0 +318,0 @@ let animationOut = this.animationOut;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc