lightgallery 2.7.1 → 2.7.2-beta.0

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 (74) hide show
  1. package/angular/10/esm2015/lib/lightgallery-angular.component.js +1 -1
  2. package/angular/10/esm2015/lib/lightgallery-angular.module.js +1 -1
  3. package/angular/10/esm2015/lib/lightgallery-angular.service.js +1 -1
  4. package/angular/10/esm2015/lightgallery-angular-10.js +1 -1
  5. package/angular/10/esm2015/public-api.js +1 -1
  6. package/angular/10/lib/lightgallery-angular.component.d.ts.map +1 -1
  7. package/angular/10/lib/lightgallery-angular.module.d.ts.map +1 -1
  8. package/angular/10/lib/lightgallery-angular.service.d.ts.map +1 -1
  9. package/angular/10/lightgallery-angular-10.d.ts.map +1 -1
  10. package/angular/10/public-api.d.ts.map +1 -1
  11. package/lib/plugins/zoom/lg-zoom-settings.js +1 -0
  12. package/lib/plugins/zoom/lg-zoom-settings.js.map +1 -1
  13. package/lib/plugins/zoom/lg-zoom.js +18 -6
  14. package/lib/plugins/zoom/lg-zoom.js.map +1 -1
  15. package/lightgallery.es5.js +1 -1
  16. package/lightgallery.min.js +1 -1
  17. package/lightgallery.umd.js +1 -1
  18. package/lit/lightgallery.esm.js +1 -1
  19. package/lit/lightgallery.umd.js +1 -1
  20. package/package.json +1 -1
  21. package/plugins/autoplay/lg-autoplay.es5.js +1 -1
  22. package/plugins/autoplay/lg-autoplay.min.js +1 -1
  23. package/plugins/autoplay/lg-autoplay.umd.js +1 -1
  24. package/plugins/comment/lg-comment.es5.js +1 -1
  25. package/plugins/comment/lg-comment.min.js +1 -1
  26. package/plugins/comment/lg-comment.umd.js +1 -1
  27. package/plugins/fullscreen/lg-fullscreen.es5.js +1 -1
  28. package/plugins/fullscreen/lg-fullscreen.min.js +1 -1
  29. package/plugins/fullscreen/lg-fullscreen.umd.js +1 -1
  30. package/plugins/hash/lg-hash.es5.js +1 -1
  31. package/plugins/hash/lg-hash.min.js +1 -1
  32. package/plugins/hash/lg-hash.umd.js +1 -1
  33. package/plugins/mediumZoom/lg-medium-zoom.es5.js +1 -1
  34. package/plugins/mediumZoom/lg-medium-zoom.min.js +1 -1
  35. package/plugins/mediumZoom/lg-medium-zoom.umd.js +1 -1
  36. package/plugins/pager/lg-pager.es5.js +1 -1
  37. package/plugins/pager/lg-pager.min.js +1 -1
  38. package/plugins/pager/lg-pager.umd.js +1 -1
  39. package/plugins/relativeCaption/lg-relative-caption.es5.js +1 -1
  40. package/plugins/relativeCaption/lg-relative-caption.min.js +1 -1
  41. package/plugins/relativeCaption/lg-relative-caption.umd.js +1 -1
  42. package/plugins/rotate/lg-rotate.es5.js +1 -1
  43. package/plugins/rotate/lg-rotate.min.js +1 -1
  44. package/plugins/rotate/lg-rotate.umd.js +1 -1
  45. package/plugins/share/lg-share.es5.js +1 -1
  46. package/plugins/share/lg-share.min.js +1 -1
  47. package/plugins/share/lg-share.umd.js +1 -1
  48. package/plugins/thumbnail/lg-thumbnail.es5.js +1 -1
  49. package/plugins/thumbnail/lg-thumbnail.min.js +1 -1
  50. package/plugins/thumbnail/lg-thumbnail.umd.js +1 -1
  51. package/plugins/video/lg-video.es5.js +1 -1
  52. package/plugins/video/lg-video.min.js +1 -1
  53. package/plugins/video/lg-video.umd.js +1 -1
  54. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +1 -1
  55. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js +1 -1
  56. package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +1 -1
  57. package/plugins/zoom/lg-zoom-settings.d.ts +5 -0
  58. package/plugins/zoom/lg-zoom.d.ts +1 -0
  59. package/plugins/zoom/lg-zoom.es5.js +20 -7
  60. package/plugins/zoom/lg-zoom.es5.js.map +1 -1
  61. package/plugins/zoom/lg-zoom.min.js +2 -2
  62. package/plugins/zoom/lg-zoom.umd.js +20 -7
  63. package/plugins/zoom/lg-zoom.umd.js.map +1 -1
  64. package/react/Lightgallery.es5.js +1 -1
  65. package/react/Lightgallery.es5.js.map +1 -1
  66. package/react/Lightgallery.umd.js +1 -1
  67. package/react/Lightgallery.umd.js.map +1 -1
  68. package/vue/LightGalleryVue.common.js +31 -12
  69. package/vue/LightGalleryVue.common.js.map +1 -1
  70. package/vue/LightGalleryVue.umd.js +31 -12
  71. package/vue/LightGalleryVue.umd.js.map +1 -1
  72. package/vue/LightGalleryVue.umd.min.js +2 -2
  73. package/vue/LightGalleryVue.umd.min.js.map +1 -1
  74. package/lit/lightgallery.d.ts +0 -21
@@ -1,5 +1,5 @@
1
1
  /**
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -16,6 +16,11 @@ export interface ZoomSettings {
16
16
  * Enable/Disable zoom option
17
17
  */
18
18
  zoom: boolean;
19
+ /**
20
+ * Enable/Disable infinite zoom
21
+ * @description If you set this to true, you can zoom in more than the original size of the image.
22
+ */
23
+ infiniteZoom: boolean;
19
24
  /**
20
25
  * Enable actual size icon.
21
26
  */
@@ -29,6 +29,7 @@ export default class Zoom {
29
29
  private imageReset;
30
30
  zoomableTimeout: any;
31
31
  positionChanged: boolean;
32
+ zoomInProgress: boolean;
32
33
  pageX: number;
33
34
  pageY: number;
34
35
  scale: number;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * lightgallery | 2.7.1 | January 11th 2023
2
+ * lightgallery | 2.7.2-beta.0 | May 25th 2023
3
3
  * http://www.lightgalleryjs.com/
4
4
  * Copyright (c) 2020 Sachin Neravath;
5
5
  * @license GPLv3
@@ -34,6 +34,7 @@ var __assign = function() {
34
34
  var zoomSettings = {
35
35
  scale: 1,
36
36
  zoom: true,
37
+ infiniteZoom: true,
37
38
  actualSize: true,
38
39
  showZoomInOutIcons: false,
39
40
  actualSizeIcons: {
@@ -357,6 +358,10 @@ var Zoom = /** @class */ (function () {
357
358
  */
358
359
  Zoom.prototype.setActualSize = function (index, event) {
359
360
  var _this = this;
361
+ if (this.zoomInProgress) {
362
+ return;
363
+ }
364
+ this.zoomInProgress = true;
360
365
  var currentItem = this.core.galleryItems[this.core.index];
361
366
  this.resetImageTranslate(index);
362
367
  setTimeout(function () {
@@ -376,10 +381,13 @@ var Zoom = /** @class */ (function () {
376
381
  _this.setPageCords(event);
377
382
  _this.beginZoom(_this.scale);
378
383
  _this.zoomImage(_this.scale, _this.scale - prevScale, true, true);
379
- setTimeout(function () {
380
- _this.core.outer.removeClass('lg-grabbing').addClass('lg-grab');
381
- }, 10);
382
384
  }, 50);
385
+ setTimeout(function () {
386
+ _this.core.outer.removeClass('lg-grabbing').addClass('lg-grab');
387
+ }, 60);
388
+ setTimeout(function () {
389
+ _this.zoomInProgress = false;
390
+ }, ZOOM_TRANSITION_DURATION + 110);
383
391
  };
384
392
  Zoom.prototype.getNaturalWidth = function (index) {
385
393
  var $image = this.core.getSlideItem(index).find('.lg-image').first();
@@ -526,7 +534,7 @@ var Zoom = /** @class */ (function () {
526
534
  scale = 1;
527
535
  }
528
536
  _this.beginZoom(scale);
529
- _this.zoomImage(scale, -_this.settings.scale, true, true);
537
+ _this.zoomImage(scale, -_this.settings.scale, true, !_this.settings.infiniteZoom);
530
538
  }, timeout);
531
539
  });
532
540
  this.core.getElementById('lg-zoom-in').on('click.lg', function () {
@@ -550,6 +558,7 @@ var Zoom = /** @class */ (function () {
550
558
  var prevIndex = event.detail.prevIndex;
551
559
  _this.scale = 1;
552
560
  _this.positionChanged = false;
561
+ _this.zoomInProgress = false;
553
562
  _this.resetZoom(prevIndex);
554
563
  _this.resetImageTranslate(prevIndex);
555
564
  if (_this.isImageSlide(_this.core.index)) {
@@ -563,6 +572,7 @@ var Zoom = /** @class */ (function () {
563
572
  // Store the zoomable timeout value just to clear it while closing
564
573
  this.zoomableTimeout = false;
565
574
  this.positionChanged = false;
575
+ this.zoomInProgress = false;
566
576
  };
567
577
  Zoom.prototype.zoomIn = function () {
568
578
  // Allow zoom only on image
@@ -570,9 +580,11 @@ var Zoom = /** @class */ (function () {
570
580
  return;
571
581
  }
572
582
  var scale = this.scale + this.settings.scale;
573
- scale = this.getScale(scale);
583
+ if (!this.settings.infiniteZoom) {
584
+ scale = this.getScale(scale);
585
+ }
574
586
  this.beginZoom(scale);
575
- this.zoomImage(scale, Math.min(this.settings.scale, scale - this.scale), true, true);
587
+ this.zoomImage(scale, Math.min(this.settings.scale, scale - this.scale), true, !this.settings.infiniteZoom);
576
588
  };
577
589
  // Reset zoom effect
578
590
  Zoom.prototype.resetZoom = function (index) {
@@ -945,6 +957,7 @@ var Zoom = /** @class */ (function () {
945
957
  };
946
958
  Zoom.prototype.closeGallery = function () {
947
959
  this.resetZoom();
960
+ this.zoomInProgress = false;
948
961
  };
949
962
  Zoom.prototype.destroy = function () {
950
963
  // Unbind all events added by lightGallery zoom plugin