Skip to content

Commit

Permalink
Version 1.8.2 release
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinchoolur committed Sep 1, 2020
1 parent 6e12a53 commit 08245da
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 30 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lightgallery",
"version": "1.8.1",
"version": "1.8.2",
"description": "A lightweight, customizable, modular, responsive, lightbox gallery plugin for jQuery.",
"main": [
"dist/js/lightgallery.min.js",
Expand Down
2 changes: 1 addition & 1 deletion dist/css/lg-fb-comment-box.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! lightgallery - v1.8.1 - 2020-08-31
/*! lightgallery - v1.8.2 - 2020-09-01
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
.lg-outer.fb-comments .lg-img-wrap, .lg-outer.fb-comments .lg-video-cont {
Expand Down
2 changes: 1 addition & 1 deletion dist/css/lg-transitions.css

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

2 changes: 1 addition & 1 deletion dist/css/lightgallery.css

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

45 changes: 24 additions & 21 deletions dist/js/lightgallery-all.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*! lightgallery - v1.8.1 - 2020-08-31
/*! lightgallery - v1.8.2 - 2020-09-01
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
/*! lightgallery - v1.8.1 - 2020-08-31
/*! lightgallery - v1.8.2 - 2020-09-01
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
(function (root, factory) {
Expand Down Expand Up @@ -3395,7 +3395,7 @@

}));

/*! lg-rotate - v1.0.0 - 2020-08-29
/*! lg-rotate - v1.1.0 - 2020-09-01
* http://sachinchoolur.github.io/lightGallery
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */

Expand Down Expand Up @@ -3458,7 +3458,11 @@
Rotate.prototype.init = function () {
var _this = this;
this.buildTemplates();
this.resetRotateValues();

// Save rotate config for each item to persist its rotate, flip values
// even after navigating to diferent slides
this.rotateValuesList = {};


// event triggered after appending slide content
this.core.$el.on('onAferAppendSlide.lg.tm.rotate', function (event, index) {
Expand All @@ -3483,52 +3487,51 @@
.on('click.lg', this.flipVertical.bind(this));

// Reset rotate on slide change
this.core.$el.on('onBeforeSlide.lg.tm.rotate', function () {
_this.resetRotateValues();
this.core.$el.on('onBeforeSlide.lg.tm.rotate', function (event, prevIndex, index) {
if (!_this.rotateValuesList[index]) {
_this.rotateValuesList[index] = {
rotate: 0,
flipHorizontal: 1,
flipVertical: 1,
};
}
});
};

Rotate.prototype.applyStyles = function () {
var $image = this.core.$slide.eq(this.core.index).find('.lg-img-rotate');
$image.css(
'transform',
'rotate(' + this.rotateValues.rotate + 'deg) scale3d(' + this.rotateValues.flipVertical + ', ' + this.rotateValues.flipHorizontal + ', 1)'
'rotate(' + this.rotateValuesList[this.core.index].rotate + 'deg)' +
' scale3d(' + this.rotateValuesList[this.core.index].flipVertical +
', ' + this.rotateValuesList[this.core.index].flipHorizontal + ', 1)'
);
};

Rotate.prototype.rotateLeft = function () {
this.rotateValues.rotate -= 90;
this.rotateValuesList[this.core.index].rotate -= 90;
this.applyStyles();
};

Rotate.prototype.rotateRight = function () {
this.rotateValues.rotate += 90;
this.rotateValuesList[this.core.index].rotate += 90;
this.applyStyles();
};

Rotate.prototype.flipHorizontal = function () {
this.rotateValues.flipHorizontal *= -1;
this.rotateValuesList[this.core.index].flipHorizontal *= -1;
this.applyStyles();
};

Rotate.prototype.flipVertical = function () {
this.rotateValues.flipVertical *= -1;
this.rotateValuesList[this.core.index].flipVertical *= -1;
this.applyStyles();
};

// Reset rotate effect
Rotate.prototype.resetRotateValues = function () {
this.rotateValues = {
rotate: 0,
flipHorizontal: 1,
flipVertical: 1,
};
};

Rotate.prototype.destroy = function () {
// Unbind all events added by lightGallery rotate plugin
this.core.$el.off('.lg.tm.rotate');
this.resetRotateValues();
this.rotateValuesList = {};
};

$.fn.lightGallery.modules.rotate = Rotate;
Expand Down
4 changes: 2 additions & 2 deletions dist/js/lightgallery-all.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/lightgallery.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! lightgallery - v1.8.1 - 2020-08-31
/*! lightgallery - v1.8.2 - 2020-09-01
* http://sachinchoolur.github.io/lightGallery/
* Copyright (c) 2020 Sachin N; Licensed GPLv3 */
(function (root, factory) {
Expand Down
2 changes: 1 addition & 1 deletion dist/js/lightgallery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lightgallery",
"version": "1.8.1",
"version": "1.8.2",
"description": "A lightweight, customizable, modular, responsive, lightbox gallery plugin for jQuery.",
"keywords": [
"jquery-plugin",
Expand Down

0 comments on commit 08245da

Please sign in to comment.