You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

rc-drawer

Package Overview
Dependencies
Maintainers
1
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-drawer - npm Package Compare versions

Comparing version

to
0.4.8

47

lib/Drawer.js

@@ -78,3 +78,3 @@ 'use strict';

_this.setState({
touchIdentifier: !_this.overlayClicked ? touch.identifier : null,
touchIdentifier: !_this.notTouch ? touch.identifier : null,
touchStartX: touch.clientX,

@@ -105,2 +105,3 @@ touchStartY: touch.clientY,

_this.onTouchEnd = function () {
_this.notTouch = false;
if (_this.isTouching()) {

@@ -385,3 +386,6 @@ // trigger a change to open if sidebar has been dragged beyond dragToggleDistance

if (open) {
rootProps.onTouchStart = this.onTouchStart;
rootProps.onTouchStart = function (ev) {
_this2.notTouch = true;
_this2.onTouchStart(ev);
};
rootProps.onTouchMove = this.onTouchMove;

@@ -400,18 +404,18 @@ rootProps.onTouchEnd = this.onTouchEnd;

var evt = {};
// FastClick use touchstart instead of click
if (this.state.touchSupported) {
evt.onTouchStart = function () {
_this2.overlayClicked = true;
_this2.onOverlayClicked();
};
evt.onTouchEnd = function () {
_this2.overlayClicked = false;
_this2.setState({
touchIdentifier: null
});
};
} else {
evt.onClick = this.onOverlayClicked;
}
// const evt = {};
// // FastClick use touchstart instead of click
// if (this.state.touchSupported) {
// evt.onTouchStart = () => {
// this.notTouch = true;
// this.onOverlayClicked();
// };
// evt.onTouchEnd = () => {
// this.notTouch = false;
// this.setState({
// touchIdentifier: null,
// });
// };
// } else {
// evt.onClick = this.onOverlayClicked;
// }

@@ -428,8 +432,9 @@ return _react2["default"].createElement(

),
_react2["default"].createElement('div', (0, _extends3["default"])({ className: prefixCls + '-overlay',
_react2["default"].createElement('div', { className: prefixCls + '-overlay',
style: overlayStyle,
role: 'presentation',
tabIndex: '0',
ref: 'overlay'
}, evt)),
ref: 'overlay',
onClick: this.onOverlayClicked
}),
_react2["default"].createElement(

@@ -436,0 +441,0 @@ 'div',

{
"name": "rc-drawer",
"version": "0.4.7",
"version": "0.4.8",
"description": "drawer ui component for react",

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