react-multi-carousel
Advanced tools
Comparing version 1.3.14 to 1.3.15
@@ -455,3 +455,3 @@ "use strict"; | ||
var currentTransform = partialVisbile | ||
? utils_1.getTransformForPartialVsibile(this.state, paritialVisibilityGutter) | ||
? utils_1.getTransformForPartialVsibile(this.state, paritialVisibilityGutter, this.props) | ||
: centerMode | ||
@@ -458,0 +458,0 @@ ? utils_1.getTransformForCenterMode(this.state, this.props) |
@@ -10,3 +10,3 @@ import { CarouselInternalState, CarouselProps } from "../types"; | ||
declare function getTransformForCenterMode(state: CarouselInternalState, props: CarouselProps): number; | ||
declare function getTransformForPartialVsibile(state: CarouselInternalState, paritialVisibilityGutter?: number): number; | ||
declare function getTransformForPartialVsibile(state: CarouselInternalState, paritialVisibilityGutter: number | undefined, props: CarouselProps): number; | ||
export { getInitialState, getIfSlideIsVisbile, getTransformForCenterMode, getTransformForPartialVsibile }; |
@@ -36,7 +36,14 @@ "use strict"; | ||
exports.getTransformForCenterMode = getTransformForCenterMode; | ||
function getTransformForPartialVsibile(state, paritialVisibilityGutter) { | ||
function getTransformForPartialVsibile(state, paritialVisibilityGutter, props) { | ||
if (paritialVisibilityGutter === void 0) { paritialVisibilityGutter = 0; } | ||
return state.transform + state.currentSlide * paritialVisibilityGutter; | ||
var currentSlide = state.currentSlide, totalItems = state.totalItems, slidesToShow = state.slidesToShow; | ||
var isRightEndReach = !(currentSlide + 1 + slidesToShow <= totalItems); | ||
var shouldRemoveRightGutter = !props.infinite && isRightEndReach; | ||
var transform = state.transform + currentSlide * paritialVisibilityGutter; | ||
if (shouldRemoveRightGutter) { | ||
return transform + paritialVisibilityGutter; | ||
} | ||
return transform; | ||
} | ||
exports.getTransformForPartialVsibile = getTransformForPartialVsibile; | ||
//# sourceMappingURL=common.js.map |
{ | ||
"name": "react-multi-carousel", | ||
"version": "1.3.14", | ||
"version": "1.3.15", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
152483
1423