nuka-carousel
Advanced tools
Comparing version 5.0.9 to 5.0.10
@@ -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", |
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
129863
2695