Socket
Socket
Sign inDemoInstall

nuka-carousel

Package Overview
Dependencies
Maintainers
26
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuka-carousel - npm Package Compare versions

Comparing version 5.0.9 to 5.0.10

13

es-v5/carousel.js

@@ -76,2 +76,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

}, []);
useEffect(function () {
// disable img draggable attribute by default, this will improve the dragging
document.querySelectorAll('.slider-list img').forEach(function (el) {
return el.setAttribute('draggable', 'false');
});
}, []);
var slidesToScroll = props.animation === 'fade' ? props.slidesToShow : props.slidesToScroll;

@@ -199,9 +205,7 @@ var dragThreshold = (carouselWidth.current || 0) / props.slidesToShow / 2;

case 'nextSlide':
nextSlide(); // set boundaries for !wrapAround
nextSlide();
break;
case 'previousSlide':
prevSlide(); // set boundaries for !wrapAround
prevSlide();
break;

@@ -328,3 +332,2 @@

if (!props.dragging) return;
e === null || e === void 0 ? void 0 : e.preventDefault();
carouselRef === null || carouselRef === void 0 ? void 0 : (_carouselRef$current = carouselRef.current) === null || _carouselRef$current === void 0 ? void 0 : _carouselRef$current.focus();

@@ -331,0 +334,0 @@ setDragging(true);

@@ -97,2 +97,8 @@ "use strict";

}, []);
(0, _react.useEffect)(function () {
// disable img draggable attribute by default, this will improve the dragging
document.querySelectorAll('.slider-list img').forEach(function (el) {
return el.setAttribute('draggable', 'false');
});
}, []);
var slidesToScroll = props.animation === 'fade' ? props.slidesToShow : props.slidesToScroll;

@@ -220,9 +226,7 @@ var dragThreshold = (carouselWidth.current || 0) / props.slidesToShow / 2;

case 'nextSlide':
nextSlide(); // set boundaries for !wrapAround
nextSlide();
break;
case 'previousSlide':
prevSlide(); // set boundaries for !wrapAround
prevSlide();
break;

@@ -349,3 +353,2 @@

if (!props.dragging) return;
e === null || e === void 0 ? void 0 : e.preventDefault();
carouselRef === null || carouselRef === void 0 ? void 0 : (_carouselRef$current = carouselRef.current) === null || _carouselRef$current === void 0 ? void 0 : _carouselRef$current.focus();

@@ -352,0 +355,0 @@ setDragging(true);

{
"name": "nuka-carousel",
"version": "5.0.9",
"version": "5.0.10",
"description": "Pure React Carousel",

@@ -5,0 +5,0 @@ "main": "index.js",

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