carousel-slider
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -71,3 +71,3 @@ 'use strict'; | ||
);var opposite = direction === 'left' ? 'right' : 'left'; | ||
$carouselItems[activeIndex].classList.remove('appear-from-left', 'appear-from-right', 'fade-in'); | ||
$carouselItems[activeIndex].classList.remove('appear-from-left', 'appear-from-right', 'fade-in', 'active'); | ||
$carouselItems[activeIndex].classList.add('hide-to-' + opposite | ||
@@ -84,3 +84,3 @@ | ||
$carouselItems[nextIndex].classList.remove('hide-to-left', 'hide-to-right', 'fade-out'); | ||
$carouselItems[nextIndex].classList.add('appear-from-' + direction | ||
$carouselItems[nextIndex].classList.add('appear-from-' + direction, 'active' | ||
@@ -112,3 +112,3 @@ // update dots' UI | ||
// fade out active carousel-item | ||
$carouselItems[activeIndex].classList.remove('appear-from-left', 'appear-from-right', 'fade-in'); | ||
$carouselItems[activeIndex].classList.remove('appear-from-left', 'appear-from-right', 'fade-in', 'active'); | ||
$carouselItems[activeIndex].classList.add('fade-out' | ||
@@ -118,3 +118,3 @@ | ||
);$carouselItems[nextIndex].classList.remove('hide-to-left', 'hide-to-right', 'fade-out'); | ||
$carouselItems[nextIndex].classList.add('fade-in' | ||
$carouselItems[nextIndex].classList.add('fade-in', 'active' | ||
@@ -121,0 +121,0 @@ // update dots' UI |
{ | ||
"name": "carousel-slider", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"main": "carousel.js", | ||
@@ -17,6 +17,6 @@ "author": "Brenton Cozby <brenton.cozby@gmail.com>", | ||
"devDependencies": { | ||
"autoprefixer": "^7.1.1", | ||
"autoprefixer": "^7.1.2", | ||
"babel-cli": "^6.24.1", | ||
"babel-preset-env": "^1.5.1", | ||
"clean-css-cli": "^4.1.3", | ||
"babel-preset-env": "^1.6.0", | ||
"clean-css-cli": "^4.1.6", | ||
"node-sass": "^4.5.3", | ||
@@ -23,0 +23,0 @@ "postcss-cli": "^4.0.0" |
@@ -80,3 +80,3 @@ (function() { | ||
const opposite = (direction === 'left') ? 'right' : 'left' | ||
$carouselItems[activeIndex].classList.remove('appear-from-left', 'appear-from-right', 'fade-in') | ||
$carouselItems[activeIndex].classList.remove('appear-from-left', 'appear-from-right', 'fade-in', 'active') | ||
$carouselItems[activeIndex].classList.add(`hide-to-${opposite}`) | ||
@@ -94,3 +94,3 @@ | ||
$carouselItems[nextIndex].classList.remove('hide-to-left', 'hide-to-right', 'fade-out') | ||
$carouselItems[nextIndex].classList.add(`appear-from-${direction}`) | ||
$carouselItems[nextIndex].classList.add(`appear-from-${direction}`, 'active') | ||
@@ -118,3 +118,3 @@ // update dots' UI | ||
// fade out active carousel-item | ||
$carouselItems[activeIndex].classList.remove('appear-from-left', 'appear-from-right', 'fade-in') | ||
$carouselItems[activeIndex].classList.remove('appear-from-left', 'appear-from-right', 'fade-in', 'active') | ||
$carouselItems[activeIndex].classList.add('fade-out') | ||
@@ -124,3 +124,3 @@ | ||
$carouselItems[nextIndex].classList.remove('hide-to-left', 'hide-to-right', 'fade-out') | ||
$carouselItems[nextIndex].classList.add('fade-in') | ||
$carouselItems[nextIndex].classList.add('fade-in', 'active') | ||
@@ -175,2 +175,2 @@ // update dots' UI | ||
})() | ||
})() |
40463
483