Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Commit

Permalink
[Prerelease] Bumped version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Wikiki committed May 13, 2018
1 parent b88652f commit 11bb340
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 35 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
<a name="2.0.11"></a>
## [2.0.11](https://github.com/Wikiki/bulma-carousel/compare/2.0.10...2.0.11) (2018-05-13)


### Bug Fixes

* **fade:** Blank image ([2eb732c](https://github.com/Wikiki/bulma-carousel/commit/2eb732c))



<a name="2.0.10"></a>
## [2.0.10](https://github.com/Wikiki/bulma-carousel/compare/2.0.9...2.0.10) (2018-05-13)

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bulma-carousel",
"description": "Display a Image / Content carousel",
"main": "carousel.sass",
"version": "2.0.10",
"version": "2.0.11",
"authors": [
"Wikiki <[email protected]> (https://wikiki.github.io/bulma-extensions/overview)"
],
Expand Down
65 changes: 33 additions & 32 deletions dist/bulma-carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,38 +422,39 @@ class Carousel extends EventEmitter {
* @param {String} [direction='next'] Direction in which items need to move
* @return {void}
*/
_slide(direction = 'next') {
if (this.carouselItems.length) {
this.emit('carousel:slide:before', this.currentItem);
this.currentItem.node.classList.remove('is-active');
// initialize direction to change order
if (direction === 'previous') {
this.currentItem.node = this._previous(this.currentItem.node);
// add reverse class
if (!this.carousel.classList.contains('carousel-animate-fade')) {
this.carousel.classList.add('is-reversing');
this.carouselContainer.style.transform = `translateX(${ - Math.abs(this.offset)}px)`;
}
} else {
// Reorder items
this.currentItem.node = this._next(this.currentItem.node);
// re_slide reverse class
this.carousel.classList.remove('is-reversing');
this.carouselContainer.style.transform = `translateX(${Math.abs(this.offset)}px)`;
}
this.currentItem.node.classList.add('is-active');

// Disable transition to instant change order
this.carousel.classList.remove('carousel-animated');
// Enable transition to animate order 1 to order 2
setTimeout(() => {
this.carousel.classList.add('carousel-animated');
}, 50);

this._setOrder();
this.emit('carousel:slide:after', this.currentItem);
}
}
_slide(direction = 'next') {
if (this.carouselItems.length) {
this.oldItemNode = this.currentItem.node;
this.emit('carousel:slide:before', this.currentItem);
// initialize direction to change order
if (direction === 'previous') {
this.currentItem.node = this._previous(this.currentItem.node);
// add reverse class
if (!this.carousel.classList.contains('carousel-animate-fade')) {
this.carousel.classList.add('is-reversing');
this.carouselContainer.style.transform = `translateX(${ - Math.abs(this.offset)}px)`;
}
} else {
// Reorder items
this.currentItem.node = this._next(this.currentItem.node);
// re_slide reverse class
this.carousel.classList.remove('is-reversing');
this.carouselContainer.style.transform = `translateX(${Math.abs(this.offset)}px)`;
}
this.currentItem.node.classList.add('is-active');
this.oldItemNode.classList.remove('is-active');

// Disable transition to instant change order
this.carousel.classList.remove('carousel-animated');
// Enable transition to animate order 1 to order 2
setTimeout(() => {
this.carousel.classList.add('carousel-animated');
}, 50);

this._setOrder();
this.emit('carousel:slide:after', this.currentItem);
}
}

/**
* Initiate autoplay system
Expand Down
2 changes: 1 addition & 1 deletion dist/bulma-carousel.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bulma-carousel",
"version": "2.0.10",
"version": "2.0.11",
"description": "Display a Image / Content carousel",
"main": "dist/bulma-carousel.sass",
"scripts": {
Expand Down

0 comments on commit 11bb340

Please sign in to comment.