lightgallery 2.7.1-beta.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.
- package/angular/10/esm2015/lib/lightgallery-angular.component.js +1 -1
- package/angular/10/esm2015/lib/lightgallery-angular.module.js +1 -1
- package/angular/10/esm2015/lib/lightgallery-angular.service.js +1 -1
- package/angular/10/esm2015/lightgallery-angular-10.js +1 -1
- package/angular/10/esm2015/public-api.js +1 -1
- package/angular/10/lib/lightgallery-angular.component.d.ts.map +1 -1
- package/angular/10/lib/lightgallery-angular.module.d.ts.map +1 -1
- package/angular/10/lib/lightgallery-angular.service.d.ts.map +1 -1
- package/angular/10/lightgallery-angular-10.d.ts.map +1 -1
- package/angular/10/public-api.d.ts.map +1 -1
- package/lib/plugins/zoom/lg-zoom-settings.js +1 -0
- package/lib/plugins/zoom/lg-zoom-settings.js.map +1 -1
- package/lib/plugins/zoom/lg-zoom.js +18 -6
- package/lib/plugins/zoom/lg-zoom.js.map +1 -1
- package/lightgallery.es5.js +1 -1
- package/lightgallery.min.js +1 -1
- package/lightgallery.umd.js +1 -1
- package/lit/lightgallery.esm.js +1 -1
- package/lit/lightgallery.umd.js +1 -1
- package/package.json +1 -1
- package/plugins/autoplay/lg-autoplay.es5.js +1 -1
- package/plugins/autoplay/lg-autoplay.min.js +1 -1
- package/plugins/autoplay/lg-autoplay.umd.js +1 -1
- package/plugins/comment/lg-comment.es5.js +1 -1
- package/plugins/comment/lg-comment.min.js +1 -1
- package/plugins/comment/lg-comment.umd.js +1 -1
- package/plugins/fullscreen/lg-fullscreen.es5.js +1 -1
- package/plugins/fullscreen/lg-fullscreen.min.js +1 -1
- package/plugins/fullscreen/lg-fullscreen.umd.js +1 -1
- package/plugins/hash/lg-hash.es5.js +1 -1
- package/plugins/hash/lg-hash.min.js +1 -1
- package/plugins/hash/lg-hash.umd.js +1 -1
- package/plugins/mediumZoom/lg-medium-zoom.es5.js +1 -1
- package/plugins/mediumZoom/lg-medium-zoom.min.js +1 -1
- package/plugins/mediumZoom/lg-medium-zoom.umd.js +1 -1
- package/plugins/pager/lg-pager.es5.js +1 -1
- package/plugins/pager/lg-pager.min.js +1 -1
- package/plugins/pager/lg-pager.umd.js +1 -1
- package/plugins/relativeCaption/lg-relative-caption.es5.js +1 -1
- package/plugins/relativeCaption/lg-relative-caption.min.js +1 -1
- package/plugins/relativeCaption/lg-relative-caption.umd.js +1 -1
- package/plugins/rotate/lg-rotate.es5.js +1 -1
- package/plugins/rotate/lg-rotate.min.js +1 -1
- package/plugins/rotate/lg-rotate.umd.js +1 -1
- package/plugins/share/lg-share.es5.js +1 -1
- package/plugins/share/lg-share.min.js +1 -1
- package/plugins/share/lg-share.umd.js +1 -1
- package/plugins/thumbnail/lg-thumbnail.es5.js +1 -1
- package/plugins/thumbnail/lg-thumbnail.min.js +1 -1
- package/plugins/thumbnail/lg-thumbnail.umd.js +1 -1
- package/plugins/video/lg-video.es5.js +1 -1
- package/plugins/video/lg-video.min.js +1 -1
- package/plugins/video/lg-video.umd.js +1 -1
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.es5.js +1 -1
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.min.js +1 -1
- package/plugins/vimeoThumbnail/lg-vimeo-thumbnail.umd.js +1 -1
- package/plugins/zoom/lg-zoom-settings.d.ts +5 -0
- package/plugins/zoom/lg-zoom.d.ts +1 -0
- package/plugins/zoom/lg-zoom.es5.js +20 -7
- package/plugins/zoom/lg-zoom.es5.js.map +1 -1
- package/plugins/zoom/lg-zoom.min.js +2 -2
- package/plugins/zoom/lg-zoom.umd.js +20 -7
- package/plugins/zoom/lg-zoom.umd.js.map +1 -1
- package/react/Lightgallery.es5.js +1 -1
- package/react/Lightgallery.es5.js.map +1 -1
- package/react/Lightgallery.umd.js +1 -1
- package/react/Lightgallery.umd.js.map +1 -1
- package/vue/LightGalleryVue.common.js +31 -12
- package/vue/LightGalleryVue.common.js.map +1 -1
- package/vue/LightGalleryVue.umd.js +31 -12
- package/vue/LightGalleryVue.umd.js.map +1 -1
- package/vue/LightGalleryVue.umd.min.js +2 -2
- package/vue/LightGalleryVue.umd.min.js.map +1 -1
- package/lit/lightgallery.d.ts +0 -21
|
@@ -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
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* lightgallery | 2.7.
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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
|