react-multi-carousel
Advanced tools
Comparing version 1.0.25 to 1.0.26
@@ -15,4 +15,4 @@ "use strict"; | ||
const utils_1 = require("./utils"); | ||
const defaultTransitionDuration = 300; | ||
const defaultTransition = "transform ease-in-out 300ms"; | ||
const defaultTransitionDuration = 500; | ||
const defaultTransition = "transform 500ms ease-in-out"; | ||
class Container extends React.Component { | ||
@@ -164,3 +164,4 @@ constructor(props) { | ||
this.state.totalItems - this.state.slidesToShow; | ||
if (Math.abs(nextTranslate) <= translateXLimit || (isLastSlide && this.props.infinite)) { | ||
if (Math.abs(nextTranslate) <= translateXLimit || | ||
(isLastSlide && this.props.infinite)) { | ||
this.setState({ transform: nextTranslate }); | ||
@@ -185,8 +186,9 @@ } | ||
if (this.initialPosition > e.pageX) { | ||
const hasTravel = Math.round((this.initialPosition - e.pageX) / this.state.itemWidth) || 1; | ||
this.next(hasTravel === 1 ? 0 : hasTravel - 1); | ||
const hasTravel = Math.round((this.initialPosition - e.pageX) / this.state.itemWidth) || | ||
1; | ||
this.next(hasTravel === 0 || hasTravel === 1 ? 0 : hasTravel - 1); | ||
} | ||
if (e.pageX > this.initialPosition) { | ||
const hasTravel = Math.round((e.pageX - this.initialPosition) / this.state.itemWidth); | ||
this.previous(hasTravel === 1 ? 0 : hasTravel - 1); | ||
this.previous(hasTravel === 0 || hasTravel === 1 ? 0 : hasTravel - 1); | ||
} | ||
@@ -193,0 +195,0 @@ this.resetMoveStatus(); |
{ | ||
"name": "react-multi-carousel", | ||
"version": "1.0.25", | ||
"version": "1.0.26", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
37663
477