New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-spring-lightbox

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-spring-lightbox - npm Package Compare versions

Comparing version 1.1.4 to 1.1.5

21

dist/index.cjs.js

@@ -457,11 +457,6 @@ 'use strict';

yDir = _ref2$direction[1],
ctrlKey = _ref2.ctrlKey,
cancel = _ref2.cancel;
ctrlKey = _ref2.ctrlKey;
// Disable drag if Image has been zoomed in to allow for panning
if (ctrlKey || disableDrag || velocity === 0) {
cancel();
return;
}
if (ctrlKey || disableDrag || velocity === 0) return;
var draggedFarEnough = distance > pageWidth / 4;

@@ -471,5 +466,3 @@ var draggedFastEnough = velocity > 1 && distance <= pageWidth / 4; // Handle next/prev image from valid drag

if (draggedFarEnough || draggedFastEnough) {
var goToIndex = clamp(currentIndex + (xDir + yDir > 0 ? -1 : 1), 0, images.length - 1); // Cancel gesture animation
cancel();
var goToIndex = clamp(currentIndex + (xDir + yDir > 0 ? -1 : 1), 0, images.length - 1);
if (goToIndex > currentIndex) onNext();

@@ -480,9 +473,3 @@ if (goToIndex < currentIndex) onPrev();

});
return;
} // Update page x-coordinates from wheel
set(function (i) {
return getPagePositions(i, true, -distance);
});
}
},

@@ -489,0 +476,0 @@ onWheelEnd: function onWheelEnd() {

@@ -452,11 +452,6 @@ import React, { useEffect, useState, useRef } from 'react';

yDir = _ref2$direction[1],
ctrlKey = _ref2.ctrlKey,
cancel = _ref2.cancel;
ctrlKey = _ref2.ctrlKey;
// Disable drag if Image has been zoomed in to allow for panning
if (ctrlKey || disableDrag || velocity === 0) {
cancel();
return;
}
if (ctrlKey || disableDrag || velocity === 0) return;
var draggedFarEnough = distance > pageWidth / 4;

@@ -466,5 +461,3 @@ var draggedFastEnough = velocity > 1 && distance <= pageWidth / 4; // Handle next/prev image from valid drag

if (draggedFarEnough || draggedFastEnough) {
var goToIndex = clamp(currentIndex + (xDir + yDir > 0 ? -1 : 1), 0, images.length - 1); // Cancel gesture animation
cancel();
var goToIndex = clamp(currentIndex + (xDir + yDir > 0 ? -1 : 1), 0, images.length - 1);
if (goToIndex > currentIndex) onNext();

@@ -475,9 +468,3 @@ if (goToIndex < currentIndex) onPrev();

});
return;
} // Update page x-coordinates from wheel
set(function (i) {
return getPagePositions(i, true, -distance);
});
}
},

@@ -484,0 +471,0 @@ onWheelEnd: function onWheelEnd() {

2

package.json
{
"name": "react-spring-lightbox",
"version": "1.1.4",
"version": "1.1.5",
"description": "A flexible image gallery lightbox with native-feeling touch gestures and buttery smooth animations, built with react-spring.",

@@ -5,0 +5,0 @@ "author": "Tim Ellenberger <timellenberger@gmail.com>",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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