react-prismazoom
Advanced tools
Comparing version 2.0.2 to 2.0.3
# Changelog | ||
## [2.0.3] - 2021-07-06 | ||
- Prevent error when component is unmounted but still moving | ||
- Fix double-tap bug on Safari iOS | ||
## [2.0.2] - 2021-06-23 | ||
@@ -4,0 +8,0 @@ - Includes React 17 as peer dependencies |
@@ -130,2 +130,3 @@ "use strict"; | ||
var transitionDuration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; | ||
if (!_this.ref.current) return; | ||
var _this$state = _this.state, | ||
@@ -237,2 +238,3 @@ posX = _this$state.posX, | ||
event.preventDefault(); | ||
console.log('a'); | ||
@@ -574,13 +576,24 @@ if (_this.state.zoom === _this.props.minZoom) { | ||
style: style, | ||
className: className, | ||
onDoubleClick: this.handleDoubleClick, | ||
onMouseDown: this.handleMouseStart, | ||
onMouseMove: this.handleMouseMove, | ||
onMouseUp: this.handleMouseStop, | ||
onMouseLeave: this.handleMouseStop, | ||
onTouchStart: this.handleTouchStart, | ||
onTouchMove: this.handleTouchMove, | ||
onTouchEnd: this.handleTouchStop, | ||
onTouchCancel: this.handleTouchStop | ||
className: className | ||
}; | ||
if (window.matchMedia("(pointer: fine)").matches) { | ||
// Apply mouse events only to devices which include an accurate pointing device | ||
attr = _objectSpread(_objectSpread({}, attr), {}, { | ||
onDoubleClick: this.handleDoubleClick, | ||
onMouseDown: this.handleMouseStart, | ||
onMouseMove: this.handleMouseMove, | ||
onMouseUp: this.handleMouseStop, | ||
onMouseLeave: this.handleMouseStop | ||
}); | ||
} else { | ||
// Apply touch events to all other devices | ||
attr = _objectSpread(_objectSpread({}, attr), {}, { | ||
onTouchStart: this.handleTouchStart, | ||
onTouchMove: this.handleTouchMove, | ||
onTouchEnd: this.handleTouchStop, | ||
onTouchCancel: this.handleTouchStop | ||
}); | ||
} | ||
return /*#__PURE__*/_react.default.createElement("div", attr, children); | ||
@@ -587,0 +600,0 @@ } |
{ | ||
"name": "react-prismazoom", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "A pan and zoom component for React, using CSS transformations.", | ||
@@ -5,0 +5,0 @@ "author": "Sylvain DUBUS <svn.dbs@gmail.com>", |
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
32910
546