|
@@ -4,7 +4,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
|
|
|
/*!
|
|
|
* Splide.js
|
|
|
- * Version : 4.0.15
|
|
|
+ * Version : 4.0.16
|
|
|
* License : MIT
|
|
|
* Copyright: 2022 Naotoshi Fujita
|
|
|
*/
|
|
@@ -2011,6 +2011,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
getLimit = Move.getLimit,
|
|
|
exceededLimit = Move.exceededLimit,
|
|
|
translate = Move.translate;
|
|
|
+ var isSlide = Splide2.is(SLIDE);
|
|
|
var interval;
|
|
|
var callback;
|
|
|
var friction = 1;
|
|
@@ -2024,7 +2025,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
var from = getPosition();
|
|
|
clear();
|
|
|
|
|
|
- if (snap) {
|
|
|
+ if (snap && (!isSlide || !exceededLimit())) {
|
|
|
var size = Components2.Layout.sliderSize();
|
|
|
var offset = sign(destination) * size * floor(abs(destination) / size) || 0;
|
|
|
destination = Move.toPosition(Components2.Controller.toDest(destination % size)) + offset;
|
|
@@ -2052,7 +2053,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
var diff = (target - position) * friction;
|
|
|
translate(position + diff);
|
|
|
|
|
|
- if (Splide2.is(SLIDE) && !noConstrain && exceededLimit()) {
|
|
|
+ if (isSlide && !noConstrain && exceededLimit()) {
|
|
|
friction *= FRICTION_FACTOR;
|
|
|
|
|
|
if (abs(diff) < BOUNCE_DIFF_THRESHOLD) {
|