UNPKG

react-multi-carousel-18

Version:

Production-ready, lightweight fully customizable React carousel component that rocks supports multiple items and SSR(Server-side rendering) with typescript.

1 lines 629 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getLookupTableForNextSlides=void 0;const clones_1=require("./clones"),common_1=require("./common");function getLookupTableForNextSlides(numberOfDotsToShow,state,props,childrenArr){const table={},slidesToSlide=(0,common_1.getSlidesToSlide)(state,props);return Array(numberOfDotsToShow).fill(0).forEach((_,i)=>{var nextSlide=(0,clones_1.getOriginalCounterPart)(i,state,childrenArr);0===i?table[0]=nextSlide:(nextSlide=i-1,nextSlide=table[nextSlide]+slidesToSlide,table[i]=nextSlide)}),table}exports.getLookupTableForNextSlides=getLookupTableForNextSlides;