Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-swipeout

Package Overview
Dependencies
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-swipeout - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

4

HISTORY.md
# History
## 1.1.5
- fix issue/9
## 1.1.4

@@ -4,0 +8,0 @@

41

lib/Swipeout.web.js

@@ -60,3 +60,2 @@ 'use strict';

_this.openedRight = false;
_this.disabledPan = false;
return _this;

@@ -78,18 +77,3 @@ }

Swipeout.prototype.onPanStart = function onPanStart(e) {
// cannot set direction by react-harmmerjs, fix left & right direction temporarily
// wait react-harmmerjs pr #46 to merge
var _props2 = this.props;
var left = _props2.left;
var right = _props2.right;
var aev = e.additionalEvent;
if (aev === 'panright' && !left.length) {
this.disabledPan = true;
} else if (aev === 'panleft' && !right.length) {
this.disabledPan = true;
} else {
this.disabledPan = false;
}
if (this.props.disabled || this.disabledPan) {
if (this.props.disabled) {
return;

@@ -101,3 +85,3 @@ }

Swipeout.prototype.onPan = function onPan(e) {
if (this.props.disabled || this.disabledPan) {
if (this.props.disabled) {
return;

@@ -122,3 +106,3 @@ }

Swipeout.prototype.onPanEnd = function onPanEnd(e) {
if (this.props.disabled || this.disabledPan) {
if (this.props.disabled) {
return;

@@ -151,4 +135,5 @@ }

Swipeout.prototype.onTap = function onTap() {
Swipeout.prototype.onTap = function onTap(e) {
if (this.openedLeft || this.openedRight) {
e.preventDefault();
this.close();

@@ -185,5 +170,5 @@ }

Swipeout.prototype._setStyle = function _setStyle(value) {
var _props3 = this.props;
var left = _props3.left;
var right = _props3.right;
var _props2 = this.props;
var left = _props2.left;
var right = _props2.right;

@@ -204,5 +189,4 @@ var limit = value > 0 ? this.btnsLeftWidth : -this.btnsRightWidth;

Swipeout.prototype.open = function open(value, openedLeft, openedRight) {
var onOpen = this.props.onOpen;
if (onOpen && !this.openedLeft && !this.openedRight) {
onOpen();
if (!this.openedLeft && !this.openedRight) {
this.props.onOpen();
}

@@ -216,5 +200,4 @@

Swipeout.prototype.close = function close() {
var onClose = this.props.onClose;
if (onClose && (this.openedLeft || this.openedRight)) {
onClose();
if (this.openedLeft || this.openedRight) {
this.props.onClose();
}

@@ -221,0 +204,0 @@ this.openedLeft = false;

{
"name": "rc-swipeout",
"version": "1.1.4",
"version": "1.1.5",
"description": "swipe out ui component for react(web and react-native)",

@@ -5,0 +5,0 @@ "keywords": [

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