File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 1
1
# Js Carousel:
2
+
2
3
A pure Js customisable carousel, that snaps! uses CSS scroll snap on mobile.
3
4
4
5
## Features:
6
+
5
7
- Supports snapping of carousel.
6
8
- Supports autoplay with a specified interval.
7
9
- Supports scrolling and dragging.
8
10
- Direction is alterable.
9
11
- Alignment is alterable.
10
12
11
13
## Dependencies:
14
+
12
15
- Use Gesture: https://use-gesture.netlify.app/docs/#vanilla-javascript
13
16
- Anime js: https://animejs.com/
14
17
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ function Carousel(props) {
105
105
alignment ,
106
106
) ;
107
107
108
- const throttleClick = throttle ( function ( ) {
108
+ const throttleClick = throttle ( function throttlefn ( ) {
109
109
const firstChild =
110
110
parent . childNodes [ 0 ] . nodeType === Node . ELEMENT_NODE
111
111
? parent . childNodes [ 0 ]
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ export function reverseChildren(parent) {
127
127
// throttle
128
128
export function throttle ( fn , delay ) {
129
129
let lastCall = 0 ;
130
- return function ( ) {
130
+ return function throttlefn ( ) {
131
131
const now = new Date ( ) . getTime ( ) ;
132
132
if ( now - lastCall < delay ) {
133
133
return ;
You canβt perform that action at this time.
0 commit comments