lightgallery 2.5.0-beta.4 → 2.6.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/css/lg-rotate.css +7 -0
  2. package/css/lg-zoom.css +37 -5
  3. package/css/lightgallery-bundle.css +44 -5
  4. package/css/lightgallery-bundle.min.css +1 -1
  5. package/lg-settings.d.ts +4 -1
  6. package/lib/lg-settings.js.map +1 -1
  7. package/lib/lightgallery.js +9 -7
  8. package/lib/lightgallery.js.map +1 -1
  9. package/lib/plugins/rotate/lg-rotate.js +15 -8
  10. package/lib/plugins/rotate/lg-rotate.js.map +1 -1
  11. package/lib/plugins/video/lg-video-settings.js.map +1 -1
  12. package/lib/plugins/zoom/lg-zoom.js +281 -293
  13. package/lib/plugins/zoom/lg-zoom.js.map +1 -1
  14. package/lightgallery.es5.js +10 -8
  15. package/lightgallery.es5.js.map +1 -1
  16. package/lightgallery.min.js +2 -2
  17. package/lightgallery.umd.js +10 -8
  18. package/lightgallery.umd.js.map +1 -1
  19. package/lit/lightgallery.esm.js +2 -2
  20. package/lit/lightgallery.umd.js +2 -2
  21. package/package.json +1 -1
  22. package/plugins/autoplay/lg-autoplay.es5.js +1 -1
  23. package/plugins/autoplay/lg-autoplay.min.js +1 -1
  24. package/plugins/autoplay/lg-autoplay.umd.js +1 -1
  25. package/plugins/comment/lg-comment.es5.js +1 -1
  26. package/plugins/comment/lg-comment.min.js +1 -1
  27. package/plugins/comment/lg-comment.umd.js +1 -1
  28. package/plugins/fullscreen/lg-fullscreen.es5.js +1 -1
  29. package/plugins/fullscreen/lg-fullscreen.min.js +1 -1
  30. package/plugins/fullscreen/lg-fullscreen.umd.js +1 -1
  31. package/plugins/hash/lg-hash.es5.js +1 -1
  32. package/plugins/hash/lg-hash.min.js +1 -1
  33. package/plugins/hash/lg-hash.umd.js +1 -1
  34. package/plugins/mediumZoom/lg-medium-zoom.es5.js +1 -1
  35. package/plugins/mediumZoom/lg-medium-zoom.min.js +1 -1
  36. package/plugins/mediumZoom/lg-medium-zoom.umd.js +1 -1
  37. package/plugins/pager/lg-pager.es5.js +1 -1
  38. package/plugins/pager/lg-pager.min.js +1 -1
  39. package/plugins/pager/lg-pager.umd.js +1 -1
  40. package/plugins/relativeCaption/lg-relative-caption.es5.js +1 -1
  41. package/plugins/relativeCaption/lg-relative-caption.min.js +1 -1
  42. package/plugins/relativeCaption/lg-relative-caption.umd.js +1 -1
  43. package/plugins/rotate/lg-rotate.es5.js +16 -9
  44. package/plugins/rotate/lg-rotate.es5.js.map +1 -1
  45. package/plugins/rotate/lg-rotate.min.js +2 -2
  46. package/plugins/rotate/lg-rotate.umd.js +16 -9
  47. package/plugins/rotate/lg-rotate.umd.js.map +1 -1
  48. package/plugins/share/lg-share.es5.js +1 -1
  49. package/plugins/share/lg-share.min.js +1 -1
  50. package/plugins/share/lg-share.umd.js +1 -1
  51. package/plugins/thumbnail/lg-thumbnail.es5.js +1 -1
  52. package/plugins/thumbnail/lg-thumbnail.min.js +1 -1
  53. package/plugins/thumbnail/lg-thumbnail.umd.js +1 -1
  54. package/plugins/video/lg-video-settings.d.ts +1 -0
  55. package/plugins/video/lg-video.es5.js +1 -1
  56. package/plugins/video/lg-video.es5.js.map +1 -1
  57. package/plugins/video/lg-video.min.js +1 -1
  58. package/plugins/video/lg-video.umd.js +1 -1
  59. package/plugins/video/lg-video.umd.js.map +1 -1
  60. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +1 -1
  61. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js +1 -1
  62. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +1 -1
  63. package/plugins/zoom/lg-zoom.d.ts +12 -23
  64. package/plugins/zoom/lg-zoom.es5.js +282 -294
  65. package/plugins/zoom/lg-zoom.es5.js.map +1 -1
  66. package/plugins/zoom/lg-zoom.min.js +2 -2
  67. package/plugins/zoom/lg-zoom.umd.js +282 -294
  68. package/plugins/zoom/lg-zoom.umd.js.map +1 -1
  69. package/react/Lightgallery.es5.js +10 -8
  70. package/react/Lightgallery.es5.js.map +1 -1
  71. package/react/Lightgallery.umd.js +10 -8
  72. package/react/Lightgallery.umd.js.map +1 -1
  73. package/scss/lg-rotate.scss +8 -0
  74. package/scss/lg-zoom.scss +29 -2
  75. package/vue/LightGalleryVue.common.js +9 -7
  76. package/vue/LightGalleryVue.common.js.map +1 -1
  77. package/vue/LightGalleryVue.umd.js +9 -7
  78. package/vue/LightGalleryVue.umd.js.map +1 -1
  79. package/vue/LightGalleryVue.umd.min.js +1 -1
  80. package/vue/LightGalleryVue.umd.min.js.map +1 -1
@@ -21,6 +21,14 @@
21
21
  pointer-events: none;
22
22
  }
23
23
  }
24
+ .lg-img-rotate {
25
+ &:before {
26
+ content: '';
27
+ display: inline-block;
28
+ height: 100%;
29
+ vertical-align: middle;
30
+ }
31
+ }
24
32
  }
25
33
  .lg-rotate-left {
26
34
  &:after {
package/scss/lg-zoom.scss CHANGED
@@ -42,14 +42,37 @@
42
42
  .lg-dummy-img {
43
43
  // Translate required for zoom
44
44
  @include scale3d(1, 1, 1);
45
- will-change: opacity, transform;
46
45
  @include transitionCustom(
47
46
  transform $zoom-transition-duration
48
47
  cubic-bezier(0.12, 0.415, 0.01, 1.19) 0s,
49
48
  opacity 0.15s !important
50
49
  );
51
- @include transform-origin(0 0);
52
50
  @include backface-visibility(hidden);
51
+
52
+ &.no-transition {
53
+ transition: none !important;
54
+ }
55
+ &.reset-transition {
56
+ transform: scale3d(1, 1, 1) translate3d(-50%, -50%, 0px) !important;
57
+ max-width: none !important;
58
+ max-height: none !important;
59
+ top: 50% !important;
60
+ left: 50% !important;
61
+ }
62
+ &.reset-transition-x {
63
+ transform: scale3d(1, 1, 1) translate3d(-50%, 0, 0px) !important;
64
+ top: 0 !important;
65
+ left: 50% !important;
66
+ max-width: none !important;
67
+ max-height: none !important;
68
+ }
69
+ &.reset-transition-y {
70
+ transform: scale3d(1, 1, 1) translate3d(0, -50%, 0px) !important;
71
+ top: 50% !important;
72
+ left: 0% !important;
73
+ max-width: none !important;
74
+ max-height: none !important;
75
+ }
53
76
  }
54
77
  }
55
78
  }
@@ -60,6 +83,10 @@
60
83
  &:after {
61
84
  content: '\e311';
62
85
  }
86
+ .lg-actual-size & {
87
+ opacity: 0.5;
88
+ pointer-events: none;
89
+ }
63
90
  }
64
91
 
65
92
  &.lg-actual-size {
@@ -7798,7 +7798,9 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
7798
7798
  if (!$currentSlide.hasClass('lg-loaded')) {
7799
7799
  setTimeout(function () {
7800
7800
  if (_this10.getSlideType(currentGalleryItem) === 'image') {
7801
- $currentSlide.find('.lg-img-wrap').append(lg_utils.getImgMarkup(index, src, '', srcset, sizes, currentGalleryItem.sources));
7801
+ var alt = currentGalleryItem.alt;
7802
+ var altAttr = alt ? 'alt="' + alt + '"' : '';
7803
+ $currentSlide.find('.lg-img-wrap').append(lg_utils.getImgMarkup(index, src, altAttr, srcset, sizes, currentGalleryItem.sources));
7802
7804
 
7803
7805
  if (srcset || sources) {
7804
7806
  var _$img = $currentSlide.find('.lg-object');
@@ -8301,23 +8303,23 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
8301
8303
 
8302
8304
  var $item = _this17.getSlideItem(_this17.index);
8303
8305
 
8304
- if (($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) && !_this17.outer.hasClass('lg-zoomed') && !_this17.lgBusy && e.targetTouches.length === 1) {
8306
+ if (($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) && !_this17.outer.hasClass('lg-zoomed') && !_this17.lgBusy && e.touches.length === 1) {
8305
8307
  isSwiping = true;
8306
8308
  _this17.touchAction = 'swipe';
8307
8309
 
8308
8310
  _this17.manageSwipeClass();
8309
8311
 
8310
8312
  startCoords = {
8311
- pageX: e.targetTouches[0].pageX,
8312
- pageY: e.targetTouches[0].pageY
8313
+ pageX: e.touches[0].pageX,
8314
+ pageY: e.touches[0].pageY
8313
8315
  };
8314
8316
  }
8315
8317
  });
8316
8318
  this.$inner.on('touchmove.lg', function (e) {
8317
- if (isSwiping && _this17.touchAction === 'swipe' && e.targetTouches.length === 1) {
8319
+ if (isSwiping && _this17.touchAction === 'swipe' && e.touches.length === 1) {
8318
8320
  endCoords = {
8319
- pageX: e.targetTouches[0].pageX,
8320
- pageY: e.targetTouches[0].pageY
8321
+ pageX: e.touches[0].pageX,
8322
+ pageY: e.touches[0].pageY
8321
8323
  };
8322
8324
 
8323
8325
  _this17.touchMove(startCoords, endCoords, e);