diff --git a/dist/lightgallery.es5.js b/dist/lightgallery.es5.js
index 74c16bfb..826ee577 100644
--- a/dist/lightgallery.es5.js
+++ b/dist/lightgallery.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/lightgallery.min.js b/dist/lightgallery.min.js
index 963bf5d8..1ce8b689 100644
--- a/dist/lightgallery.min.js
+++ b/dist/lightgallery.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/lightgallery.umd.js b/dist/lightgallery.umd.js
index c76a7e6d..ee867ec9 100644
--- a/dist/lightgallery.umd.js
+++ b/dist/lightgallery.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/autoplay/lg-autoplay.es5.js b/dist/plugins/autoplay/lg-autoplay.es5.js
index 78cc1075..27dc721a 100644
--- a/dist/plugins/autoplay/lg-autoplay.es5.js
+++ b/dist/plugins/autoplay/lg-autoplay.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/autoplay/lg-autoplay.min.js b/dist/plugins/autoplay/lg-autoplay.min.js
index 90f5e555..7f7d1939 100644
--- a/dist/plugins/autoplay/lg-autoplay.min.js
+++ b/dist/plugins/autoplay/lg-autoplay.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/autoplay/lg-autoplay.umd.js b/dist/plugins/autoplay/lg-autoplay.umd.js
index 7d775972..46c822b4 100644
--- a/dist/plugins/autoplay/lg-autoplay.umd.js
+++ b/dist/plugins/autoplay/lg-autoplay.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/comment/lg-comment.es5.js b/dist/plugins/comment/lg-comment.es5.js
index 21c8c2d0..ac0548ff 100644
--- a/dist/plugins/comment/lg-comment.es5.js
+++ b/dist/plugins/comment/lg-comment.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/comment/lg-comment.min.js b/dist/plugins/comment/lg-comment.min.js
index 25f87818..43df0388 100644
--- a/dist/plugins/comment/lg-comment.min.js
+++ b/dist/plugins/comment/lg-comment.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/comment/lg-comment.umd.js b/dist/plugins/comment/lg-comment.umd.js
index d9021e82..08f7e3b2 100644
--- a/dist/plugins/comment/lg-comment.umd.js
+++ b/dist/plugins/comment/lg-comment.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/fullscreen/lg-fullscreen.es5.js b/dist/plugins/fullscreen/lg-fullscreen.es5.js
index aaacf253..b630e0f9 100644
--- a/dist/plugins/fullscreen/lg-fullscreen.es5.js
+++ b/dist/plugins/fullscreen/lg-fullscreen.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/fullscreen/lg-fullscreen.min.js b/dist/plugins/fullscreen/lg-fullscreen.min.js
index f77457e2..891af252 100644
--- a/dist/plugins/fullscreen/lg-fullscreen.min.js
+++ b/dist/plugins/fullscreen/lg-fullscreen.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/fullscreen/lg-fullscreen.umd.js b/dist/plugins/fullscreen/lg-fullscreen.umd.js
index e593cd3b..db480f1f 100644
--- a/dist/plugins/fullscreen/lg-fullscreen.umd.js
+++ b/dist/plugins/fullscreen/lg-fullscreen.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/hash/lg-hash.es5.js b/dist/plugins/hash/lg-hash.es5.js
index 0efba7fa..75d87509 100644
--- a/dist/plugins/hash/lg-hash.es5.js
+++ b/dist/plugins/hash/lg-hash.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/hash/lg-hash.min.js b/dist/plugins/hash/lg-hash.min.js
index ae6f6647..3776b931 100644
--- a/dist/plugins/hash/lg-hash.min.js
+++ b/dist/plugins/hash/lg-hash.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/hash/lg-hash.umd.js b/dist/plugins/hash/lg-hash.umd.js
index b86d9596..789e1d86 100644
--- a/dist/plugins/hash/lg-hash.umd.js
+++ b/dist/plugins/hash/lg-hash.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/mediumZoom/lg-medium-zoom.es5.js b/dist/plugins/mediumZoom/lg-medium-zoom.es5.js
index aa489593..6c834ef1 100644
--- a/dist/plugins/mediumZoom/lg-medium-zoom.es5.js
+++ b/dist/plugins/mediumZoom/lg-medium-zoom.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/mediumZoom/lg-medium-zoom.min.js b/dist/plugins/mediumZoom/lg-medium-zoom.min.js
index bb3904a0..cd8add31 100644
--- a/dist/plugins/mediumZoom/lg-medium-zoom.min.js
+++ b/dist/plugins/mediumZoom/lg-medium-zoom.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/mediumZoom/lg-medium-zoom.umd.js b/dist/plugins/mediumZoom/lg-medium-zoom.umd.js
index 25eb250f..7806d19f 100644
--- a/dist/plugins/mediumZoom/lg-medium-zoom.umd.js
+++ b/dist/plugins/mediumZoom/lg-medium-zoom.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/pager/lg-pager.es5.js b/dist/plugins/pager/lg-pager.es5.js
index 08df6e24..73aa737d 100644
--- a/dist/plugins/pager/lg-pager.es5.js
+++ b/dist/plugins/pager/lg-pager.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/pager/lg-pager.min.js b/dist/plugins/pager/lg-pager.min.js
index 95ef6085..e3d7eb6d 100644
--- a/dist/plugins/pager/lg-pager.min.js
+++ b/dist/plugins/pager/lg-pager.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/pager/lg-pager.umd.js b/dist/plugins/pager/lg-pager.umd.js
index f4d83c2d..8040c143 100644
--- a/dist/plugins/pager/lg-pager.umd.js
+++ b/dist/plugins/pager/lg-pager.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/relativeCaption/lg-relative-caption.es5.js b/dist/plugins/relativeCaption/lg-relative-caption.es5.js
index 2374c353..5cc202ec 100644
--- a/dist/plugins/relativeCaption/lg-relative-caption.es5.js
+++ b/dist/plugins/relativeCaption/lg-relative-caption.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/relativeCaption/lg-relative-caption.min.js b/dist/plugins/relativeCaption/lg-relative-caption.min.js
index 8e9a0d04..c5a1c3c0 100644
--- a/dist/plugins/relativeCaption/lg-relative-caption.min.js
+++ b/dist/plugins/relativeCaption/lg-relative-caption.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/relativeCaption/lg-relative-caption.umd.js b/dist/plugins/relativeCaption/lg-relative-caption.umd.js
index 9e07f96c..b2593406 100644
--- a/dist/plugins/relativeCaption/lg-relative-caption.umd.js
+++ b/dist/plugins/relativeCaption/lg-relative-caption.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/rotate/lg-rotate.es5.js b/dist/plugins/rotate/lg-rotate.es5.js
index cf4b2f91..750b1315 100644
--- a/dist/plugins/rotate/lg-rotate.es5.js
+++ b/dist/plugins/rotate/lg-rotate.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/rotate/lg-rotate.min.js b/dist/plugins/rotate/lg-rotate.min.js
index 91e9dd06..3e40a602 100644
--- a/dist/plugins/rotate/lg-rotate.min.js
+++ b/dist/plugins/rotate/lg-rotate.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/rotate/lg-rotate.umd.js b/dist/plugins/rotate/lg-rotate.umd.js
index 443b6396..ce6e8a61 100644
--- a/dist/plugins/rotate/lg-rotate.umd.js
+++ b/dist/plugins/rotate/lg-rotate.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/share/lg-share.es5.js b/dist/plugins/share/lg-share.es5.js
index d4e9d982..c30c3d96 100644
--- a/dist/plugins/share/lg-share.es5.js
+++ b/dist/plugins/share/lg-share.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/share/lg-share.min.js b/dist/plugins/share/lg-share.min.js
index 68d7b51c..1da6636e 100644
--- a/dist/plugins/share/lg-share.min.js
+++ b/dist/plugins/share/lg-share.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/share/lg-share.umd.js b/dist/plugins/share/lg-share.umd.js
index 003e9ba2..26bc336b 100644
--- a/dist/plugins/share/lg-share.umd.js
+++ b/dist/plugins/share/lg-share.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/thumbnail/lg-thumbnail.es5.js b/dist/plugins/thumbnail/lg-thumbnail.es5.js
index 29e96839..c0b6bcd2 100644
--- a/dist/plugins/thumbnail/lg-thumbnail.es5.js
+++ b/dist/plugins/thumbnail/lg-thumbnail.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
@@ -388,7 +388,7 @@ var Thumbnail = /** @class */ (function () {
}
return thumbDragUtils;
};
- Thumbnail.prototype.getThumbHtml = function (thumb, index) {
+ Thumbnail.prototype.getThumbHtml = function (thumb, index, alt) {
var slideVideoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
var thumbImg;
if (slideVideoInfo.youtube) {
@@ -407,12 +407,13 @@ var Thumbnail = /** @class */ (function () {
else {
thumbImg = thumb;
}
- return "
\n
\n
";
+ var altAttr = alt ? 'alt="' + alt + '"' : '';
+ return "\n
\n
";
};
Thumbnail.prototype.getThumbItemHtml = function (items) {
var thumbList = '';
for (var i = 0; i < items.length; i++) {
- thumbList += this.getThumbHtml(items[i].thumb, i);
+ thumbList += this.getThumbHtml(items[i].thumb, i, items[i].alt);
}
return thumbList;
};
diff --git a/dist/plugins/thumbnail/lg-thumbnail.min.js b/dist/plugins/thumbnail/lg-thumbnail.min.js
index effd345e..99c7ca4b 100644
--- a/dist/plugins/thumbnail/lg-thumbnail.min.js
+++ b/dist/plugins/thumbnail/lg-thumbnail.min.js
@@ -1,8 +1,8 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgThumbnail=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;i\n \n
\n ';this.core.outer.addClass("lg-has-thumb"),".lg-components"===this.settings.appendThumbnailsTo?this.core.$lgComponents.append(e):this.core.outer.append(e),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},o.prototype.enableThumbDrag=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},i=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",(function(s){t.thumbTotalWidth>t.thumbOuterWidth&&(s.preventDefault(),e.cords.startX=s.pageX,e.startTime=new Date,t.thumbClickable=!1,i=!0,t.core.outer.get().scrollLeft+=1,t.core.outer.get().scrollLeft-=1,t.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))})),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,(function(s){t.core.lgOpened&&i&&(e.cords.endX=s.pageX,e=t.onThumbTouchMove(e))})),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,(function(){t.core.lgOpened&&(e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0,i&&(i=!1,t.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))}))},o.prototype.enableThumbSwipe=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",(function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.startX=i.targetTouches[0].pageX,t.thumbClickable=!1,e.startTime=new Date)})),this.$lgThumb.on("touchmove.lg",(function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.endX=i.targetTouches[0].pageX,e=t.onThumbTouchMove(e))})),this.$lgThumb.on("touchend.lg",(function(){e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0}))},o.prototype.rebuildThumbnails=function(){var t=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout((function(){t.thumbTotalWidth=t.core.galleryItems.length*(t.settings.thumbWidth+t.settings.thumbMargin),t.$lgThumb.css("width",t.thumbTotalWidth+"px"),t.$lgThumb.empty(),t.setThumbItemHtml(t.core.galleryItems),t.animateThumb(t.core.index)}),50),setTimeout((function(){t.$thumbOuter.removeClass("lg-rebuilding-thumbnails")}),200)},o.prototype.setTranslate=function(t){this.$lgThumb.css("transform","translate3d(-"+t+"px, 0px, 0px)")},o.prototype.getPossibleTransformX=function(t){return t>this.thumbTotalWidth-this.thumbOuterWidth&&(t=this.thumbTotalWidth-this.thumbOuterWidth),t<0&&(t=0),t},o.prototype.animateThumb=function(t){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*t-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},o.prototype.onThumbTouchMove=function(t){return t.newTranslateX=this.translateX,t.isMoved=!0,t.touchMoveTime=(new Date).valueOf(),t.newTranslateX-=t.cords.endX-t.cords.startX,t.newTranslateX=this.getPossibleTransformX(t.newTranslateX),this.setTranslate(t.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),t},o.prototype.onThumbTouchEnd=function(t){t.isMoved=!1,t.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=t.endTime.valueOf()-t.startTime.valueOf(),i=t.cords.endX-t.cords.startX,s=Math.abs(i)/e;return s>.15&&t.endTime.valueOf()-t.touchMoveTime<30?((s+=1)>2&&(s+=1),s+=s*(Math.abs(i)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(s-1,2)+"settings"),i*=s,this.translateX=this.getPossibleTransformX(this.translateX-i),this.setTranslate(this.translateX)):this.translateX=t.newTranslateX,Math.abs(t.cords.endX-t.cords.startX)\n \n '},o.prototype.getThumbItemHtml=function(t){for(var e="",i=0;i'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",(function(){t.core.outer.toggleClass("lg-components-open")})))},o.prototype.thumbKeyPress=function(){var t=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,(function(e){t.core.lgOpened&&t.settings.toggleThumb&&(38===e.keyCode?(e.preventDefault(),t.core.outer.addClass("lg-components-open")):40===e.keyCode&&(e.preventDefault(),t.core.outer.removeClass("lg-components-open")))}))},o.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},o}()}));
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).lgThumbnail=e()}(this,(function(){"use strict";var t=function(){return(t=Object.assign||function(t){for(var e,i=1,s=arguments.length;i\n \n
\n ';this.core.outer.addClass("lg-has-thumb"),".lg-components"===this.settings.appendThumbnailsTo?this.core.$lgComponents.append(e):this.core.outer.append(e),this.$thumbOuter=this.core.outer.find(".lg-thumb-outer").first(),this.$lgThumb=this.core.outer.find(".lg-thumb").first(),this.settings.animateThumb&&this.core.outer.find(".lg-thumb").css("transition-duration",this.core.settings.speed+"ms").css("width",this.thumbTotalWidth+"px").css("position","relative"),this.setThumbItemHtml(this.core.galleryItems)},o.prototype.enableThumbDrag=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0},i=!1;this.$thumbOuter.addClass("lg-grab"),this.core.outer.find(".lg-thumb").first().on("mousedown.lg.thumb",(function(s){t.thumbTotalWidth>t.thumbOuterWidth&&(s.preventDefault(),e.cords.startX=s.pageX,e.startTime=new Date,t.thumbClickable=!1,i=!0,t.core.outer.get().scrollLeft+=1,t.core.outer.get().scrollLeft-=1,t.$thumbOuter.removeClass("lg-grab").addClass("lg-grabbing"))})),this.$LG(window).on("mousemove.lg.thumb.global"+this.core.lgId,(function(s){t.core.lgOpened&&i&&(e.cords.endX=s.pageX,e=t.onThumbTouchMove(e))})),this.$LG(window).on("mouseup.lg.thumb.global"+this.core.lgId,(function(){t.core.lgOpened&&(e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0,i&&(i=!1,t.$thumbOuter.removeClass("lg-grabbing").addClass("lg-grab")))}))},o.prototype.enableThumbSwipe=function(){var t=this,e={cords:{startX:0,endX:0},isMoved:!1,newTranslateX:0,startTime:new Date,endTime:new Date,touchMoveTime:0};this.$lgThumb.on("touchstart.lg",(function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.startX=i.targetTouches[0].pageX,t.thumbClickable=!1,e.startTime=new Date)})),this.$lgThumb.on("touchmove.lg",(function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e.cords.endX=i.targetTouches[0].pageX,e=t.onThumbTouchMove(e))})),this.$lgThumb.on("touchend.lg",(function(){e.isMoved?e=t.onThumbTouchEnd(e):t.thumbClickable=!0}))},o.prototype.rebuildThumbnails=function(){var t=this;this.$thumbOuter.addClass("lg-rebuilding-thumbnails"),setTimeout((function(){t.thumbTotalWidth=t.core.galleryItems.length*(t.settings.thumbWidth+t.settings.thumbMargin),t.$lgThumb.css("width",t.thumbTotalWidth+"px"),t.$lgThumb.empty(),t.setThumbItemHtml(t.core.galleryItems),t.animateThumb(t.core.index)}),50),setTimeout((function(){t.$thumbOuter.removeClass("lg-rebuilding-thumbnails")}),200)},o.prototype.setTranslate=function(t){this.$lgThumb.css("transform","translate3d(-"+t+"px, 0px, 0px)")},o.prototype.getPossibleTransformX=function(t){return t>this.thumbTotalWidth-this.thumbOuterWidth&&(t=this.thumbTotalWidth-this.thumbOuterWidth),t<0&&(t=0),t},o.prototype.animateThumb=function(t){if(this.$lgThumb.css("transition-duration",this.core.settings.speed+"ms"),this.settings.animateThumb){var e=0;switch(this.settings.currentPagerPosition){case"left":e=0;break;case"middle":e=this.thumbOuterWidth/2-this.settings.thumbWidth/2;break;case"right":e=this.thumbOuterWidth-this.settings.thumbWidth}this.translateX=(this.settings.thumbWidth+this.settings.thumbMargin)*t-1-e,this.translateX>this.thumbTotalWidth-this.thumbOuterWidth&&(this.translateX=this.thumbTotalWidth-this.thumbOuterWidth),this.translateX<0&&(this.translateX=0),this.setTranslate(this.translateX)}},o.prototype.onThumbTouchMove=function(t){return t.newTranslateX=this.translateX,t.isMoved=!0,t.touchMoveTime=(new Date).valueOf(),t.newTranslateX-=t.cords.endX-t.cords.startX,t.newTranslateX=this.getPossibleTransformX(t.newTranslateX),this.setTranslate(t.newTranslateX),this.$thumbOuter.addClass("lg-dragging"),t},o.prototype.onThumbTouchEnd=function(t){t.isMoved=!1,t.endTime=new Date,this.$thumbOuter.removeClass("lg-dragging");var e=t.endTime.valueOf()-t.startTime.valueOf(),i=t.cords.endX-t.cords.startX,s=Math.abs(i)/e;return s>.15&&t.endTime.valueOf()-t.touchMoveTime<30?((s+=1)>2&&(s+=1),s+=s*(Math.abs(i)/this.thumbOuterWidth),this.$lgThumb.css("transition-duration",Math.min(s-1,2)+"settings"),i*=s,this.translateX=this.getPossibleTransformX(this.translateX-i),this.setTranslate(this.translateX)):this.translateX=t.newTranslateX,Math.abs(t.cords.endX-t.cords.startX)\n \n '},o.prototype.getThumbItemHtml=function(t){for(var e="",i=0;i'),this.core.outer.find(".lg-toggle-thumb").first().on("click.lg",(function(){t.core.outer.toggleClass("lg-components-open")})))},o.prototype.thumbKeyPress=function(){var t=this;this.$LG(window).on("keydown.lg.thumb.global"+this.core.lgId,(function(e){t.core.lgOpened&&t.settings.toggleThumb&&(38===e.keyCode?(e.preventDefault(),t.core.outer.addClass("lg-components-open")):40===e.keyCode&&(e.preventDefault(),t.core.outer.removeClass("lg-components-open")))}))},o.prototype.destroy=function(){this.settings.thumbnail&&(this.$LG(window).off(".lg.thumb.global"+this.core.lgId),this.core.LGel.off(".lg.thumb"),this.core.LGel.off(".thumb"),this.$thumbOuter.remove(),this.core.outer.removeClass("lg-has-thumb"))},o}()}));
diff --git a/dist/plugins/thumbnail/lg-thumbnail.umd.js b/dist/plugins/thumbnail/lg-thumbnail.umd.js
index 3fa9e294..04e3d005 100644
--- a/dist/plugins/thumbnail/lg-thumbnail.umd.js
+++ b/dist/plugins/thumbnail/lg-thumbnail.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
@@ -394,7 +394,7 @@
}
return thumbDragUtils;
};
- Thumbnail.prototype.getThumbHtml = function (thumb, index) {
+ Thumbnail.prototype.getThumbHtml = function (thumb, index, alt) {
var slideVideoInfo = this.core.galleryItems[index].__slideVideoInfo || {};
var thumbImg;
if (slideVideoInfo.youtube) {
@@ -413,12 +413,13 @@
else {
thumbImg = thumb;
}
- return "\n
\n
";
+ var altAttr = alt ? 'alt="' + alt + '"' : '';
+ return "\n
\n
";
};
Thumbnail.prototype.getThumbItemHtml = function (items) {
var thumbList = '';
for (var i = 0; i < items.length; i++) {
- thumbList += this.getThumbHtml(items[i].thumb, i);
+ thumbList += this.getThumbHtml(items[i].thumb, i, items[i].alt);
}
return thumbList;
};
diff --git a/dist/plugins/video/lg-video.es5.js b/dist/plugins/video/lg-video.es5.js
index 2f3af762..69c38f37 100644
--- a/dist/plugins/video/lg-video.es5.js
+++ b/dist/plugins/video/lg-video.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/video/lg-video.min.js b/dist/plugins/video/lg-video.min.js
index a13f30ae..16f8d7a0 100644
--- a/dist/plugins/video/lg-video.min.js
+++ b/dist/plugins/video/lg-video.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/video/lg-video.umd.js b/dist/plugins/video/lg-video.umd.js
index 99783145..3b5920b0 100644
--- a/dist/plugins/video/lg-video.umd.js
+++ b/dist/plugins/video/lg-video.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js b/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js
index 3e3ccb5d..64533774 100644
--- a/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js
+++ b/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js b/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js
index ea9f4f91..b4ec19b6 100644
--- a/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js
+++ b/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js b/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js
index 4e658648..4c3736e7 100644
--- a/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js
+++ b/dist/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/zoom/lg-zoom.es5.js b/dist/plugins/zoom/lg-zoom.es5.js
index c3203232..c225073e 100644
--- a/dist/plugins/zoom/lg-zoom.es5.js
+++ b/dist/plugins/zoom/lg-zoom.es5.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/zoom/lg-zoom.min.js b/dist/plugins/zoom/lg-zoom.min.js
index cdf9a312..64610d73 100644
--- a/dist/plugins/zoom/lg-zoom.min.js
+++ b/dist/plugins/zoom/lg-zoom.min.js
@@ -1,5 +1,5 @@
/**
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/dist/plugins/zoom/lg-zoom.umd.js b/dist/plugins/zoom/lg-zoom.umd.js
index 240d9b26..fbd863c6 100644
--- a/dist/plugins/zoom/lg-zoom.umd.js
+++ b/dist/plugins/zoom/lg-zoom.umd.js
@@ -1,5 +1,5 @@
/*!
- * lightgallery | 2.7.2-beta.0 | May 25th 2023
+ * lightgallery | 2.7.2-beta.1 | June 13th 2023
* http://www.lightgalleryjs.com/
* Copyright (c) 2020 Sachin Neravath;
* @license GPLv3
diff --git a/package.json b/package.json
index e9f1f538..3b528a66 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "lightgallery",
- "version": "2.7.2-beta.0",
+ "version": "2.7.2-beta.1",
"description": "lightGallery is a feature-rich, modular JavaScript gallery plugin for building beautiful image and video galleries for the web and the mobile",
"keywords": [
"JavaScript",