Skip to content

Commit df639cb

Browse files
Update the Splide version.
1 parent be286ce commit df639cb

7 files changed

+44
-8182
lines changed

.npmignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ node_modules/
22
images/
33
examples/
44
local/
5-
5+
.idea/
6+
.github/
67
.editorconfig

dist/js/vue-splide.esm.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { defineComponent, ref, onMounted, onBeforeUnmount, onUpdated, watch, computed, openBlock, createElementBlock, renderSlot, createCommentVNode, createElementVNode, Fragment } from "vue";
22
/*!
33
* Splide.js
4-
* Version : 3.1.6
4+
* Version : 3.1.7
55
* License : MIT
66
* Copyright: 2021 Naotoshi Fujita
77
*/
@@ -170,6 +170,9 @@ function style(elm, prop, value) {
170170
function display(elm, display2) {
171171
style(elm, "display", display2);
172172
}
173+
function focus(elm) {
174+
elm["setActive"] && elm["setActive"]() || elm.focus({ preventScroll: true });
175+
}
173176
function getAttribute(elm, attr) {
174177
return elm.getAttribute(attr);
175178
}
@@ -1180,8 +1183,8 @@ function Move(Splide2, Components2, options) {
11801183
return position;
11811184
}
11821185
function offset(index) {
1183-
const { focus } = options;
1184-
return focus === "center" ? (listSize() - slideSize(index, true)) / 2 : +focus * slideSize(index) || 0;
1186+
const { focus: focus2 } = options;
1187+
return focus2 === "center" ? (listSize() - slideSize(index, true)) / 2 : +focus2 * slideSize(index) || 0;
11851188
}
11861189
function getLimit(max2) {
11871190
return toPosition(max2 ? Components2.Controller.getEnd() : 0, !!options.trimSpace);
@@ -1771,12 +1774,12 @@ function Drag(Splide2, Components2, options) {
17711774
function coordOf(e, orthogonal) {
17721775
return (isTouchEvent(e) ? e.touches[0] : e)[`page${resolve(orthogonal ? "Y" : "X")}`];
17731776
}
1774-
function isTouchEvent(e) {
1775-
return typeof TouchEvent !== "undefined" && e instanceof TouchEvent;
1776-
}
17771777
function timeOf(e) {
17781778
return e.timeStamp;
17791779
}
1780+
function isTouchEvent(e) {
1781+
return typeof TouchEvent !== "undefined" && e instanceof TouchEvent;
1782+
}
17801783
function constrain(diff) {
17811784
return diff / (hasExceeded && Splide2.is(SLIDE) ? FRICTION : 1);
17821785
}
@@ -1969,7 +1972,7 @@ function Pagination(Splide2, Components2, options) {
19691972
function onClick(page) {
19701973
Controller2.go(`>${page}`, true, () => {
19711974
const Slide2 = Slides2.getAt(Controller2.toIndex(page));
1972-
Slide2 && Slide2.slide.focus();
1975+
Slide2 && focus(Slide2.slide);
19731976
});
19741977
}
19751978
function getAt(index) {

dist/js/vue-splide.umd.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"use strict";
55
/*!
66
* Splide.js
7-
* Version : 3.1.6
7+
* Version : 3.1.7
88
* License : MIT
99
* Copyright: 2021 Naotoshi Fujita
1010
*/
@@ -173,6 +173,9 @@
173173
function display(elm, display2) {
174174
style(elm, "display", display2);
175175
}
176+
function focus(elm) {
177+
elm["setActive"] && elm["setActive"]() || elm.focus({ preventScroll: true });
178+
}
176179
function getAttribute(elm, attr) {
177180
return elm.getAttribute(attr);
178181
}
@@ -1183,8 +1186,8 @@
11831186
return position;
11841187
}
11851188
function offset(index) {
1186-
const { focus } = options;
1187-
return focus === "center" ? (listSize() - slideSize(index, true)) / 2 : +focus * slideSize(index) || 0;
1189+
const { focus: focus2 } = options;
1190+
return focus2 === "center" ? (listSize() - slideSize(index, true)) / 2 : +focus2 * slideSize(index) || 0;
11881191
}
11891192
function getLimit(max2) {
11901193
return toPosition(max2 ? Components2.Controller.getEnd() : 0, !!options.trimSpace);
@@ -1774,12 +1777,12 @@
17741777
function coordOf(e, orthogonal) {
17751778
return (isTouchEvent(e) ? e.touches[0] : e)[`page${resolve(orthogonal ? "Y" : "X")}`];
17761779
}
1777-
function isTouchEvent(e) {
1778-
return typeof TouchEvent !== "undefined" && e instanceof TouchEvent;
1779-
}
17801780
function timeOf(e) {
17811781
return e.timeStamp;
17821782
}
1783+
function isTouchEvent(e) {
1784+
return typeof TouchEvent !== "undefined" && e instanceof TouchEvent;
1785+
}
17831786
function constrain(diff) {
17841787
return diff / (hasExceeded && Splide2.is(SLIDE) ? FRICTION : 1);
17851788
}
@@ -1972,7 +1975,7 @@
19721975
function onClick(page) {
19731976
Controller2.go(`>${page}`, true, () => {
19741977
const Slide2 = Slides2.getAt(Controller2.toIndex(page));
1975-
Slide2 && Slide2.slide.focus();
1978+
Slide2 && focus(Slide2.slide);
19761979
});
19771980
}
19781981
function getAt(index) {

0 commit comments

Comments
 (0)