Skip to content

Commit 94d54f7

Browse files
Update dependencies.
1 parent 3c34e92 commit 94d54f7

File tree

4 files changed

+2022
-1008
lines changed

4 files changed

+2022
-1008
lines changed

dist/js/vue-splide.cjs.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function _createClass(Constructor, protoProps, staticProps) {
2121
}
2222
/*!
2323
* Splide.js
24-
* Version : 4.0.15
24+
* Version : 4.0.16
2525
* License : MIT
2626
* Copyright: 2022 Naotoshi Fujita
2727
*/
@@ -1642,6 +1642,7 @@ function Scroll(Splide2, Components2, options) {
16421642
var set = Splide2.state.set;
16431643
var Move2 = Components2.Move;
16441644
var getPosition = Move2.getPosition, getLimit = Move2.getLimit, exceededLimit = Move2.exceededLimit, translate = Move2.translate;
1645+
var isSlide = Splide2.is(SLIDE);
16451646
var interval;
16461647
var callback;
16471648
var friction = 1;
@@ -1652,7 +1653,7 @@ function Scroll(Splide2, Components2, options) {
16521653
function scroll(destination, duration, snap, onScrolled, noConstrain) {
16531654
var from = getPosition();
16541655
clear();
1655-
if (snap) {
1656+
if (snap && (!isSlide || !exceededLimit())) {
16561657
var size = Components2.Layout.sliderSize();
16571658
var offset = sign(destination) * size * floor(abs(destination) / size) || 0;
16581659
destination = Move2.toPosition(Components2.Controller.toDest(destination % size)) + offset;
@@ -1676,7 +1677,7 @@ function Scroll(Splide2, Components2, options) {
16761677
var target = from + (to - from) * easing(rate);
16771678
var diff = (target - position) * friction;
16781679
translate(position + diff);
1679-
if (Splide2.is(SLIDE) && !noConstrain && exceededLimit()) {
1680+
if (isSlide && !noConstrain && exceededLimit()) {
16801681
friction *= FRICTION_FACTOR;
16811682
if (abs(diff) < BOUNCE_DIFF_THRESHOLD) {
16821683
scroll(getLimit(exceededLimit(true)), BOUNCE_DURATION, false, callback, true);

dist/js/vue-splide.esm.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function _createClass(Constructor, protoProps, staticProps) {
1919
}
2020
/*!
2121
* Splide.js
22-
* Version : 4.0.15
22+
* Version : 4.0.16
2323
* License : MIT
2424
* Copyright: 2022 Naotoshi Fujita
2525
*/
@@ -1640,6 +1640,7 @@ function Scroll(Splide2, Components2, options) {
16401640
var set = Splide2.state.set;
16411641
var Move2 = Components2.Move;
16421642
var getPosition = Move2.getPosition, getLimit = Move2.getLimit, exceededLimit = Move2.exceededLimit, translate = Move2.translate;
1643+
var isSlide = Splide2.is(SLIDE);
16431644
var interval;
16441645
var callback;
16451646
var friction = 1;
@@ -1650,7 +1651,7 @@ function Scroll(Splide2, Components2, options) {
16501651
function scroll(destination, duration, snap, onScrolled, noConstrain) {
16511652
var from = getPosition();
16521653
clear();
1653-
if (snap) {
1654+
if (snap && (!isSlide || !exceededLimit())) {
16541655
var size = Components2.Layout.sliderSize();
16551656
var offset = sign(destination) * size * floor(abs(destination) / size) || 0;
16561657
destination = Move2.toPosition(Components2.Controller.toDest(destination % size)) + offset;
@@ -1674,7 +1675,7 @@ function Scroll(Splide2, Components2, options) {
16741675
var target = from + (to - from) * easing(rate);
16751676
var diff = (target - position) * friction;
16761677
translate(position + diff);
1677-
if (Splide2.is(SLIDE) && !noConstrain && exceededLimit()) {
1678+
if (isSlide && !noConstrain && exceededLimit()) {
16781679
friction *= FRICTION_FACTOR;
16791680
if (abs(diff) < BOUNCE_DIFF_THRESHOLD) {
16801681
scroll(getLimit(exceededLimit(true)), BOUNCE_DURATION, false, callback, true);

0 commit comments

Comments
 (0)