react-responsive-carousel
Advanced tools
Comparing version 3.1.4 to 3.1.5
@@ -112,3 +112,5 @@ 'use strict'; | ||
carouselWrapper.addEventListener('mouseenter', this.stopOnHover); | ||
carouselWrapper.addEventListener('touchstart', this.stopOnHover); | ||
carouselWrapper.addEventListener('mouseleave', this.autoPlay); | ||
carouselWrapper.addEventListener('touchend', this.autoPlay); | ||
} | ||
@@ -121,4 +123,6 @@ }, | ||
var carouselWrapper = ReactDOM.findDOMNode(this.carouselWrapper); | ||
carouselWrapper.removeEventListener('mousemove', this.stopOnHover); | ||
carouselWrapper.removeEventListener('mouseenter', this.stopOnHover); | ||
carouselWrapper.removeEventListener('touchstart', this.stopOnHover); | ||
carouselWrapper.removeEventListener('mouseleave', this.autoPlay); | ||
carouselWrapper.removeEventListener('touchend', this.autoPlay); | ||
} | ||
@@ -131,3 +135,2 @@ }, | ||
_this.increment(); | ||
_this.autoPlay(); | ||
}, this.props.interval); | ||
@@ -138,2 +141,6 @@ }, | ||
}, | ||
resetAutoPlay: function resetAutoPlay() { | ||
this.clearAutoPlay(); | ||
this.autoPlay(); | ||
}, | ||
stopOnHover: function stopOnHover() { | ||
@@ -293,2 +300,6 @@ this.clearAutoPlay(); | ||
}); | ||
if (this.props.autoPlay) { | ||
this.resetAutoPlay(); | ||
} | ||
}, | ||
@@ -295,0 +306,0 @@ changeItem: function changeItem(e) { |
{ | ||
"name": "react-responsive-carousel", | ||
"version": "3.1.4", | ||
"version": "3.1.5", | ||
"description": "React Responsive Carousel", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -86,3 +86,3 @@ import React from 'react'; | ||
.add('auto play', () => ( | ||
<Carousel autoPlay={true} infiniteLoop={true}> | ||
<Carousel autoPlay={true} interval={3000} infiniteLoop={true}> | ||
{ baseChildren.props.children } | ||
@@ -89,0 +89,0 @@ </Carousel> |
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
910399
1368