UNPKG
motion-plus-vue
Version:
latest (1.8.1)
1.8.1
1.8.0
1.7.0
1.6.0
1.5.1
1.5.0
1.5.0-beta.1
1.4.0
1.3.1
1.3.0
1.2.1
1.2.0
1.2.0-beta.1
1.2.0-alpha.0
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
1.1.1
1.1.0
1.0.1
1.0.0
0.1.0
0.0.2
0.0.1
Motion Plus Vue
motion-plus-vue
/
dist
/
es
/
components
/
Carousel
/
utils
/
find-current-index.mjs
14 lines
(13 loc)
•
262 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function
a
(
e, t, r
) {
const
o =
Math
.
floor
(e / r), l = o * r;
let
f =
0
;
for
(
let
n =
0
; n < t.
length
; n++) {
const
{
end
: d } = t[n];
if
(f = n, d + l > e)
break
; }
return
f + o * t.
length
; }
export
{ a
as
findCurrentIndexFromInset };