File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Js Carousel:
2+
23A pure Js customisable carousel, that snaps! uses CSS scroll snap on mobile.
34
45## Features:
6+
57- Supports snapping of carousel.
68- Supports autoplay with a specified interval.
79- Supports scrolling and dragging.
810- Direction is alterable.
911- Alignment is alterable.
1012
1113## Dependencies:
14+
1215- Use Gesture: https://use-gesture.netlify.app/docs/#vanilla-javascript
1316- Anime js: https://animejs.com/
1417
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ function Carousel(props) {
105105 alignment ,
106106 ) ;
107107
108- const throttleClick = throttle ( function ( ) {
108+ const throttleClick = throttle ( function throttlefn ( ) {
109109 const firstChild =
110110 parent . childNodes [ 0 ] . nodeType === Node . ELEMENT_NODE
111111 ? parent . childNodes [ 0 ]
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ export function reverseChildren(parent) {
127127// throttle
128128export function throttle ( fn , delay ) {
129129 let lastCall = 0 ;
130- return function ( ) {
130+ return function throttlefn ( ) {
131131 const now = new Date ( ) . getTime ( ) ;
132132 if ( now - lastCall < delay ) {
133133 return ;
You canβt perform that action at this time.
0 commit comments