lightgallery 2.6.0-beta.1 → 2.6.0-beta.2

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 (60) hide show
  1. package/lib/lightgallery.js +15 -10
  2. package/lib/lightgallery.js.map +1 -1
  3. package/lightgallery.d.ts +1 -0
  4. package/lightgallery.es5.js +16 -11
  5. package/lightgallery.es5.js.map +1 -1
  6. package/lightgallery.min.js +2 -2
  7. package/lightgallery.umd.js +16 -11
  8. package/lightgallery.umd.js.map +1 -1
  9. package/lit/lightgallery.esm.js +2 -2
  10. package/lit/lightgallery.umd.js +2 -2
  11. package/package.json +1 -1
  12. package/plugins/autoplay/lg-autoplay.es5.js +1 -1
  13. package/plugins/autoplay/lg-autoplay.min.js +1 -1
  14. package/plugins/autoplay/lg-autoplay.umd.js +1 -1
  15. package/plugins/comment/lg-comment.es5.js +1 -1
  16. package/plugins/comment/lg-comment.min.js +1 -1
  17. package/plugins/comment/lg-comment.umd.js +1 -1
  18. package/plugins/fullscreen/lg-fullscreen.es5.js +1 -1
  19. package/plugins/fullscreen/lg-fullscreen.min.js +1 -1
  20. package/plugins/fullscreen/lg-fullscreen.umd.js +1 -1
  21. package/plugins/hash/lg-hash.es5.js +1 -1
  22. package/plugins/hash/lg-hash.min.js +1 -1
  23. package/plugins/hash/lg-hash.umd.js +1 -1
  24. package/plugins/mediumZoom/lg-medium-zoom.es5.js +1 -1
  25. package/plugins/mediumZoom/lg-medium-zoom.min.js +1 -1
  26. package/plugins/mediumZoom/lg-medium-zoom.umd.js +1 -1
  27. package/plugins/pager/lg-pager.es5.js +1 -1
  28. package/plugins/pager/lg-pager.min.js +1 -1
  29. package/plugins/pager/lg-pager.umd.js +1 -1
  30. package/plugins/relativeCaption/lg-relative-caption.es5.js +1 -1
  31. package/plugins/relativeCaption/lg-relative-caption.min.js +1 -1
  32. package/plugins/relativeCaption/lg-relative-caption.umd.js +1 -1
  33. package/plugins/rotate/lg-rotate.es5.js +1 -1
  34. package/plugins/rotate/lg-rotate.min.js +1 -1
  35. package/plugins/rotate/lg-rotate.umd.js +1 -1
  36. package/plugins/share/lg-share.es5.js +1 -1
  37. package/plugins/share/lg-share.min.js +1 -1
  38. package/plugins/share/lg-share.umd.js +1 -1
  39. package/plugins/thumbnail/lg-thumbnail.es5.js +1 -1
  40. package/plugins/thumbnail/lg-thumbnail.min.js +1 -1
  41. package/plugins/thumbnail/lg-thumbnail.umd.js +1 -1
  42. package/plugins/video/lg-video.es5.js +1 -1
  43. package/plugins/video/lg-video.min.js +1 -1
  44. package/plugins/video/lg-video.umd.js +1 -1
  45. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +1 -1
  46. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js +1 -1
  47. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +1 -1
  48. package/plugins/zoom/lg-zoom.es5.js +1 -1
  49. package/plugins/zoom/lg-zoom.min.js +1 -1
  50. package/plugins/zoom/lg-zoom.umd.js +1 -1
  51. package/react/Lightgallery.es5.js +17 -12
  52. package/react/Lightgallery.es5.js.map +1 -1
  53. package/react/Lightgallery.umd.js +17 -12
  54. package/react/Lightgallery.umd.js.map +1 -1
  55. package/vue/LightGalleryVue.common.js +18 -13
  56. package/vue/LightGalleryVue.common.js.map +1 -1
  57. package/vue/LightGalleryVue.umd.js +18 -13
  58. package/vue/LightGalleryVue.umd.js.map +1 -1
  59. package/vue/LightGalleryVue.umd.min.js +1 -1
  60. package/vue/LightGalleryVue.umd.min.js.map +1 -1
@@ -8922,6 +8922,19 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
8922
8922
  this.updateCounterTotal();
8923
8923
  this.manageSingleSlideClassName();
8924
8924
  }
8925
+ }, {
8926
+ key: "destroyGallery",
8927
+ value: function destroyGallery() {
8928
+ this.destroyModules(true);
8929
+
8930
+ if (!this.settings.dynamic) {
8931
+ this.invalidateItems();
8932
+ }
8933
+
8934
+ $LG(window).off(".lg.global".concat(this.lgId));
8935
+ this.LGel.off('.lg');
8936
+ this.$container.remove();
8937
+ }
8925
8938
  /**
8926
8939
  * Destroy lightGallery.
8927
8940
  * Destroy lightGallery and its plugin instances completely
@@ -8939,22 +8952,14 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
8939
8952
  }, {
8940
8953
  key: "destroy",
8941
8954
  value: function destroy() {
8942
- var _this29 = this;
8943
-
8944
8955
  var closeTimeout = this.closeGallery(true);
8945
- setTimeout(function () {
8946
- _this29.destroyModules(true);
8947
-
8948
- if (!_this29.settings.dynamic) {
8949
- _this29.invalidateItems();
8950
- }
8951
8956
 
8952
- $LG(window).off(".lg.global".concat(_this29.lgId));
8953
-
8954
- _this29.LGel.off('.lg');
8957
+ if (closeTimeout) {
8958
+ setTimeout(this.destroyGallery.bind(this), closeTimeout);
8959
+ } else {
8960
+ this.destroyGallery();
8961
+ }
8955
8962
 
8956
- _this29.$container.remove();
8957
- }, closeTimeout);
8958
8963
  return closeTimeout;
8959
8964
  }
8960
8965
  }]);