embla-carousel
Advanced tools
Comparing version 0.5.0 to 0.5.1
export declare type ChunkSize = { | ||
getRoot: number; | ||
measure: (n: number) => number; | ||
root: number; | ||
}; | ||
export declare function ChunkSize(root: number): ChunkSize; |
@@ -608,3 +608,3 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
align: align, | ||
root: chunkSize.getRoot | ||
root: chunkSize.root | ||
}); | ||
@@ -627,7 +627,9 @@ var slideSizes = slides.map(utils_1.rectWidth).map(chunkSize.measure); | ||
}); | ||
var maxLimit = alignSizes[0]; | ||
var minLimit = -contentSize + alignSizes[0] + (loop ? chunkSize.measure(1) : slideSizes[index.max]); | ||
var lastSlideSize = slideSizes[index.max]; | ||
var endOffset = loop ? chunkSize.measure(1) : lastSlideSize; | ||
var max = alignSizes[0]; | ||
var min = max + -contentSize + endOffset; | ||
var limit = limit_1.Limit({ | ||
max: maxLimit, | ||
min: minLimit | ||
max: max, | ||
min: min | ||
}); // Draw | ||
@@ -668,6 +670,7 @@ | ||
var target = vector1d_1.Vector1D(startLocation); | ||
var vectors = [locationAtDragStart, location, target]; | ||
var mover = mover_1.Mover({ | ||
location: location, | ||
mass: 1.5, | ||
maxForce: chunkSize.getRoot * 2, | ||
maxForce: chunkSize.root * 2, | ||
speed: speedLimit.constrain(speed) | ||
@@ -722,3 +725,3 @@ }); | ||
span: contentSize, | ||
vectors: [location, target, locationAtDragStart] | ||
vectors: vectors | ||
}), | ||
@@ -851,4 +854,4 @@ mover: mover, | ||
var self = { | ||
getRoot: 100, | ||
measure: measure | ||
measure: measure, | ||
root: 100 | ||
}; | ||
@@ -1089,3 +1092,3 @@ return Object.freeze(self); | ||
}, 0); | ||
var viewSize = chunkSize.getRoot; | ||
var viewSize = chunkSize.root; | ||
var distance = sizesPercent.reduce(function (a, s) { | ||
@@ -1092,0 +1095,0 @@ return a + s; |
{ | ||
"name": "embla-carousel", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"author": "David Cetinkaya", | ||
@@ -5,0 +5,0 @@ "private": false, |
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
62800
1865