react-easy-swipe
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -111,6 +111,6 @@ (function (global, factory) { | ||
try { | ||
addEventListener("test", null, Object.defineProperty({}, 'capture', { get: function get() { | ||
addEventListener('test', null, Object.defineProperty({}, 'capture', { get: function get() { | ||
setHasSupportToCaptureOption(true); | ||
} })); | ||
} catch (e) {} | ||
} catch (e) {} // eslint-disable-line no-empty | ||
@@ -164,2 +164,4 @@ function getSafeEventHandlerOpts() { | ||
_this._onMouseUp = _this._onMouseUp.bind(_this); | ||
_this._setSwiperRef = _this._setSwiperRef.bind(_this); | ||
return _this; | ||
@@ -285,6 +287,10 @@ } | ||
}, { | ||
key: '_setSwiperRef', | ||
value: function _setSwiperRef(node) { | ||
this.swiper = node; | ||
this.props.innerRef(node); | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
var _this2 = this; | ||
var _props = this.props, | ||
@@ -303,3 +309,5 @@ tagName = _props.tagName, | ||
onSwipeEnd = _props.onSwipeEnd, | ||
props = _objectWithoutProperties(_props, ['tagName', 'className', 'style', 'children', 'allowMouseEvents', 'onSwipeUp', 'onSwipeDown', 'onSwipeLeft', 'onSwipeRight', 'onSwipeStart', 'onSwipeMove', 'onSwipeEnd']); | ||
innerRef = _props.innerRef, | ||
tolerance = _props.tolerance, | ||
props = _objectWithoutProperties(_props, ['tagName', 'className', 'style', 'children', 'allowMouseEvents', 'onSwipeUp', 'onSwipeDown', 'onSwipeLeft', 'onSwipeRight', 'onSwipeStart', 'onSwipeMove', 'onSwipeEnd', 'innerRef', 'tolerance']); | ||
@@ -309,5 +317,3 @@ return _react2.default.createElement( | ||
_extends({ | ||
ref: function ref(node) { | ||
return _this2.swiper = node; | ||
}, | ||
ref: this._setSwiperRef, | ||
onMouseDown: this._onMouseDown, | ||
@@ -341,2 +347,3 @@ onTouchStart: this._handleSwipeStart, | ||
onSwipeEnd: _propTypes2.default.func, | ||
innerRef: _propTypes2.default.func, | ||
tolerance: _propTypes2.default.number.isRequired | ||
@@ -354,2 +361,3 @@ }; | ||
onSwipeEnd: function onSwipeEnd() {}, | ||
innerRef: function innerRef() {}, | ||
@@ -356,0 +364,0 @@ tolerance: 0 |
{ | ||
"name": "react-easy-swipe", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "React easy swipe - Easy handler for common touch operations", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
187650
444