forked from davidjerleke/embla-carousel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
3676-4ca4fdd6362d73858a68.js.map
1 lines (1 loc) · 1.68 KB
/
3676-4ca4fdd6362d73858a68.js.map
1
{"version":3,"file":"3676-4ca4fdd6362d73858a68.js","mappings":"uIAAA,o5C","sources":["webpack://embla-carousel-docs/./src/components/Sandbox/Vanilla/SandboxFilesDist/EmblaCarouselArrowButtons.js"],"sourcesContent":["export default \"\\nconst addTogglePrevNextBtnsActive = (emblaApi, prevBtn, nextBtn) => {\\n const togglePrevNextBtnsState = () => {\\n if (emblaApi.canScrollPrev())\\n prevBtn.removeAttribute('disabled');\\n else\\n prevBtn.setAttribute('disabled', 'disabled');\\n \\n if (emblaApi.canScrollNext())\\n nextBtn.removeAttribute('disabled');\\n else\\n nextBtn.setAttribute('disabled', 'disabled');\\n };\\n \\n emblaApi\\n .on('select', togglePrevNextBtnsState)\\n .on('init', togglePrevNextBtnsState)\\n .on('reInit', togglePrevNextBtnsState);\\n \\n return () => {\\n prevBtn.removeAttribute('disabled');\\n nextBtn.removeAttribute('disabled');\\n };\\n};\\n\\nexport const addPrevNextBtnsClickHandlers = (emblaApi, prevBtn, nextBtn) => {\\n const scrollPrev = () => {\\n emblaApi.scrollPrev();\\n };\\n const scrollNext = () => {\\n emblaApi.scrollNext();\\n };\\n prevBtn.addEventListener('click', scrollPrev, false);\\n nextBtn.addEventListener('click', scrollNext, false);\\n \\n const removeTogglePrevNextBtnsActive = addTogglePrevNextBtnsActive(emblaApi, prevBtn, nextBtn);\\n \\n return () => {\\n removeTogglePrevNextBtnsActive();\\n prevBtn.removeEventListener('click', scrollPrev, false);\\n nextBtn.removeEventListener('click', scrollNext, false);\\n };\\n};\\n\";"],"names":[],"sourceRoot":""}