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

react-modal-image

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-modal-image - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

19

es/ModalImage.js

@@ -50,6 +50,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

return { x: x, y: y };
}, _this.handleMouseDown = function (event) {
}, _this.handleMouseDownOrTouchStart = function (event) {
event.preventDefault();
var coords = _this.getCoordinatesIfOverImg(event);
var coords = _this.getCoordinatesIfOverImg(event.changedTouches ? event.changedTouches[event.changedTouches.length - 1] : event);

@@ -69,6 +69,6 @@ if (!coords) {

});
}, _this.handleMouseMove = function (event) {
}, _this.handleMouseMoveOrTouchMove = function (event) {
event.preventDefault();
var coords = _this.getCoordinatesIfOverImg(event);
var coords = _this.getCoordinatesIfOverImg(event.changedTouches ? event.changedTouches[event.changedTouches.length - 1] : event);

@@ -91,3 +91,3 @@ if (!coords) {

});
}, _this.handleMouseUp = function (event) {
}, _this.handleMouseUpOrTouchEnd = function (event) {
_this.setState({

@@ -143,5 +143,8 @@ moveStart: undefined

{
onMouseDown: this.handleMouseDown,
onMouseUp: this.handleMouseUp,
onMouseMove: this.handleMouseMove,
onMouseDown: this.handleMouseDownOrTouchStart,
onMouseUp: this.handleMouseUpOrTouchEnd,
onMouseMove: this.handleMouseMoveOrTouchMove,
onTouchStart: this.handleMouseDownOrTouchStart,
onTouchEnd: this.handleMouseUpOrTouchEnd,
onTouchMove: this.handleMouseMoveOrTouchMove,
ref: function ref(el) {

@@ -148,0 +151,0 @@ _this2.contentEl = el;

@@ -9,3 +9,4 @@ export var modalStyles = {

overflow: "auto",
backgroundColor: "rgba(0, 0, 0, 0.8)"
backgroundColor: "rgba(0, 0, 0, 0.8)",
touchAction: "none"
};

@@ -12,0 +13,0 @@

@@ -59,6 +59,6 @@ "use strict";

return { x: x, y: y };
}, _this.handleMouseDown = function (event) {
}, _this.handleMouseDownOrTouchStart = function (event) {
event.preventDefault();
var coords = _this.getCoordinatesIfOverImg(event);
var coords = _this.getCoordinatesIfOverImg(event.changedTouches ? event.changedTouches[event.changedTouches.length - 1] : event);

@@ -78,6 +78,6 @@ if (!coords) {

});
}, _this.handleMouseMove = function (event) {
}, _this.handleMouseMoveOrTouchMove = function (event) {
event.preventDefault();
var coords = _this.getCoordinatesIfOverImg(event);
var coords = _this.getCoordinatesIfOverImg(event.changedTouches ? event.changedTouches[event.changedTouches.length - 1] : event);

@@ -100,3 +100,3 @@ if (!coords) {

});
}, _this.handleMouseUp = function (event) {
}, _this.handleMouseUpOrTouchEnd = function (event) {
_this.setState({

@@ -152,5 +152,8 @@ moveStart: undefined

{
onMouseDown: this.handleMouseDown,
onMouseUp: this.handleMouseUp,
onMouseMove: this.handleMouseMove,
onMouseDown: this.handleMouseDownOrTouchStart,
onMouseUp: this.handleMouseUpOrTouchEnd,
onMouseMove: this.handleMouseMoveOrTouchMove,
onTouchStart: this.handleMouseDownOrTouchStart,
onTouchEnd: this.handleMouseUpOrTouchEnd,
onTouchMove: this.handleMouseMoveOrTouchMove,
ref: function ref(el) {

@@ -157,0 +160,0 @@ _this2.contentEl = el;

@@ -12,3 +12,4 @@ "use strict";

overflow: "auto",
backgroundColor: "rgba(0, 0, 0, 0.8)"
backgroundColor: "rgba(0, 0, 0, 0.8)",
touchAction: "none"
};

@@ -15,0 +16,0 @@

{
"name": "react-modal-image",
"version": "1.0.4",
"version": "1.0.5",
"description": "Lightweight Lightbox React Component",
"main": "lib/index.js",
"module": "es/index.js",
"files": [
"es",
"lib"
],
"files": ["es", "lib"],
"scripts": {

@@ -36,9 +33,3 @@ "build": "nwb build-react-component",

"license": "MIT",
"keywords": [
"react-component",
"lightbox",
"modal",
"image",
"react"
]
"keywords": ["react-component", "lightbox", "modal", "image", "react"]
}
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