lightgallery 2.3.0-beta.3 → 2.4.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/README.md +4 -0
- package/angular/10/bundles/lightgallery-angular-10.umd.js +34 -1
- package/angular/10/bundles/lightgallery-angular-10.umd.js.map +1 -1
- package/angular/10/bundles/lightgallery-angular-10.umd.min.js +1 -1
- package/angular/10/bundles/lightgallery-angular-10.umd.min.js.map +1 -1
- package/angular/10/esm2015/lib/lightgallery-angular.component.js +35 -2
- package/angular/10/fesm2015/lightgallery-angular-10.js +34 -1
- package/angular/10/fesm2015/lightgallery-angular-10.js.map +1 -1
- package/angular/10/lib/lightgallery-angular.component.d.ts +6 -2
- package/angular/10/lib/lightgallery-angular.component.d.ts.map +1 -1
- package/angular/11/bundles/lightgallery-angular-11.umd.js +34 -1
- package/angular/11/bundles/lightgallery-angular-11.umd.js.map +1 -1
- package/angular/11/bundles/lightgallery-angular-11.umd.min.js +1 -1
- package/angular/11/bundles/lightgallery-angular-11.umd.min.js.map +1 -1
- package/angular/11/esm2015/lib/lightgallery-angular.component.js +35 -2
- package/angular/11/fesm2015/lightgallery-angular-11.js +34 -1
- package/angular/11/fesm2015/lightgallery-angular-11.js.map +1 -1
- package/angular/11/lib/lightgallery-angular.component.d.ts +6 -2
- package/angular/11/lib/lightgallery-angular.component.d.ts.map +1 -1
- package/angular/9/bundles/lightgallery-angular-9.umd.js +34 -1
- package/angular/9/bundles/lightgallery-angular-9.umd.js.map +1 -1
- package/angular/9/bundles/lightgallery-angular-9.umd.min.js +1 -1
- package/angular/9/bundles/lightgallery-angular-9.umd.min.js.map +1 -1
- package/angular/9/esm2015/lib/lightgallery-angular.component.js +35 -2
- package/angular/9/esm5/lib/lightgallery-angular.component.js +35 -2
- package/angular/9/fesm2015/lightgallery-angular-9.js +34 -1
- package/angular/9/fesm2015/lightgallery-angular-9.js.map +1 -1
- package/angular/9/fesm5/lightgallery-angular-9.js +34 -1
- package/angular/9/fesm5/lightgallery-angular-9.js.map +1 -1
- package/angular/9/lib/lightgallery-angular.component.d.ts +6 -2
- package/angular/bundles/lightgallery-angular.umd.js +34 -1
- package/angular/bundles/lightgallery-angular.umd.js.map +1 -1
- package/angular/esm2015/lib/lightgallery-angular.component.js +35 -2
- package/angular/fesm2015/lightgallery-angular.js +34 -1
- package/angular/fesm2015/lightgallery-angular.js.map +1 -1
- package/angular/lib/lightgallery-angular.component.d.ts +6 -2
- package/angular/lib/lightgallery-angular.component.d.ts.map +1 -1
- package/css/lightgallery-bundle.css +0 -1
- package/css/lightgallery-bundle.min.css +1 -1
- package/css/lightgallery-core.css +0 -1
- package/css/lightgallery.css +0 -1
- package/lg-events.d.ts +44 -0
- package/lg-settings.d.ts +30 -2
- package/lg-utils.d.ts +16 -4
- package/lib/lg-events.js +3 -0
- package/lib/lg-events.js.map +1 -1
- package/lib/lg-settings.js +12 -1
- package/lib/lg-settings.js.map +1 -1
- package/lib/lg-utils.js +4 -4
- package/lib/lg-utils.js.map +1 -1
- package/lib/lgQuery.js +29 -20
- package/lib/lgQuery.js.map +1 -1
- package/lib/lightgallery.js +30 -16
- package/lib/lightgallery.js.map +1 -1
- package/lib/plugins/autoplay/lg-autoplay-settings.js +3 -0
- package/lib/plugins/autoplay/lg-autoplay-settings.js.map +1 -1
- package/lib/plugins/autoplay/lg-autoplay.js +20 -11
- package/lib/plugins/autoplay/lg-autoplay.js.map +1 -1
- package/lib/plugins/comment/lg-comment-settings.js +3 -0
- package/lib/plugins/comment/lg-comment-settings.js.map +1 -1
- package/lib/plugins/comment/lg-comment.js +1 -1
- package/lib/plugins/comment/lg-comment.js.map +1 -1
- package/lib/plugins/fullscreen/lg-fullscreen-settings.js +3 -0
- package/lib/plugins/fullscreen/lg-fullscreen-settings.js.map +1 -1
- package/lib/plugins/fullscreen/lg-fullscreen.js +1 -2
- package/lib/plugins/fullscreen/lg-fullscreen.js.map +1 -1
- package/lib/plugins/rotate/lg-rotate-settings.js +6 -0
- package/lib/plugins/rotate/lg-rotate-settings.js.map +1 -1
- package/lib/plugins/rotate/lg-rotate.js +4 -8
- package/lib/plugins/rotate/lg-rotate.js.map +1 -1
- package/lib/plugins/share/lg-share-settings.js +1 -0
- package/lib/plugins/share/lg-share-settings.js.map +1 -1
- package/lib/plugins/share/lg-share.js +1 -1
- package/lib/plugins/share/lg-share.js.map +1 -1
- package/lib/plugins/thumbnail/lg-thumbnail-settings.js +3 -0
- package/lib/plugins/thumbnail/lg-thumbnail-settings.js.map +1 -1
- package/lib/plugins/thumbnail/lg-thumbnail.js +3 -1
- package/lib/plugins/thumbnail/lg-thumbnail.js.map +1 -1
- package/lib/plugins/zoom/lg-zoom-settings.js +5 -0
- package/lib/plugins/zoom/lg-zoom-settings.js.map +1 -1
- package/lib/plugins/zoom/lg-zoom.js +2 -2
- package/lib/plugins/zoom/lg-zoom.js.map +1 -1
- package/lightgallery.d.ts +1 -1
- package/lightgallery.es5.js +172 -135
- package/lightgallery.es5.js.map +1 -1
- package/lightgallery.min.js +2 -2
- package/lightgallery.umd.js +172 -135
- package/lightgallery.umd.js.map +1 -1
- package/lit/lightgallery.esm.js +7 -7
- package/lit/lightgallery.umd.js +3 -3
- package/package.json +1 -1
- package/plugins/autoplay/lg-autoplay-settings.d.ts +7 -0
- package/plugins/autoplay/lg-autoplay.d.ts +2 -2
- package/plugins/autoplay/lg-autoplay.es5.js +27 -12
- package/plugins/autoplay/lg-autoplay.es5.js.map +1 -1
- package/plugins/autoplay/lg-autoplay.min.js +2 -2
- package/plugins/autoplay/lg-autoplay.umd.js +27 -12
- package/plugins/autoplay/lg-autoplay.umd.js.map +1 -1
- package/plugins/comment/lg-comment-settings.d.ts +7 -0
- package/plugins/comment/lg-comment.es5.js +8 -2
- package/plugins/comment/lg-comment.es5.js.map +1 -1
- package/plugins/comment/lg-comment.min.js +2 -2
- package/plugins/comment/lg-comment.umd.js +8 -2
- package/plugins/comment/lg-comment.umd.js.map +1 -1
- package/plugins/fullscreen/lg-fullscreen-settings.d.ts +7 -0
- package/plugins/fullscreen/lg-fullscreen.es5.js +5 -3
- package/plugins/fullscreen/lg-fullscreen.es5.js.map +1 -1
- package/plugins/fullscreen/lg-fullscreen.min.js +2 -2
- package/plugins/fullscreen/lg-fullscreen.umd.js +5 -3
- package/plugins/fullscreen/lg-fullscreen.umd.js.map +1 -1
- package/plugins/hash/lg-hash.es5.js +4 -1
- package/plugins/hash/lg-hash.es5.js.map +1 -1
- package/plugins/hash/lg-hash.min.js +1 -1
- package/plugins/hash/lg-hash.umd.js +4 -1
- package/plugins/hash/lg-hash.umd.js.map +1 -1
- package/plugins/mediumZoom/lg-medium-zoom.es5.js +4 -1
- package/plugins/mediumZoom/lg-medium-zoom.es5.js.map +1 -1
- package/plugins/mediumZoom/lg-medium-zoom.min.js +1 -1
- package/plugins/mediumZoom/lg-medium-zoom.umd.js +4 -1
- package/plugins/mediumZoom/lg-medium-zoom.umd.js.map +1 -1
- package/plugins/pager/lg-pager.es5.js +4 -1
- package/plugins/pager/lg-pager.es5.js.map +1 -1
- package/plugins/pager/lg-pager.min.js +1 -1
- package/plugins/pager/lg-pager.umd.js +4 -1
- package/plugins/pager/lg-pager.umd.js.map +1 -1
- package/plugins/relativeCaption/lg-relative-caption.es5.js +4 -1
- package/plugins/relativeCaption/lg-relative-caption.es5.js.map +1 -1
- package/plugins/relativeCaption/lg-relative-caption.min.js +1 -1
- package/plugins/relativeCaption/lg-relative-caption.umd.js +4 -1
- package/plugins/relativeCaption/lg-relative-caption.umd.js.map +1 -1
- package/plugins/rotate/lg-rotate-settings.d.ts +11 -0
- package/plugins/rotate/lg-rotate.es5.js +14 -9
- package/plugins/rotate/lg-rotate.es5.js.map +1 -1
- package/plugins/rotate/lg-rotate.min.js +2 -2
- package/plugins/rotate/lg-rotate.umd.js +14 -9
- package/plugins/rotate/lg-rotate.umd.js.map +1 -1
- package/plugins/share/lg-share-settings.d.ts +8 -0
- package/plugins/share/lg-share.es5.js +6 -2
- package/plugins/share/lg-share.es5.js.map +1 -1
- package/plugins/share/lg-share.min.js +2 -2
- package/plugins/share/lg-share.umd.js +6 -2
- package/plugins/share/lg-share.umd.js.map +1 -1
- package/plugins/thumbnail/lg-thumbnail-settings.d.ts +8 -0
- package/plugins/thumbnail/lg-thumbnail.es5.js +10 -2
- package/plugins/thumbnail/lg-thumbnail.es5.js.map +1 -1
- package/plugins/thumbnail/lg-thumbnail.min.js +2 -2
- package/plugins/thumbnail/lg-thumbnail.umd.js +10 -2
- package/plugins/thumbnail/lg-thumbnail.umd.js.map +1 -1
- package/plugins/video/lg-video.es5.js +4 -1
- package/plugins/video/lg-video.es5.js.map +1 -1
- package/plugins/video/lg-video.min.js +1 -1
- package/plugins/video/lg-video.umd.js +4 -1
- package/plugins/video/lg-video.umd.js.map +1 -1
- package/plugins/zoom/lg-zoom-settings.d.ts +9 -0
- package/plugins/zoom/lg-zoom.es5.js +11 -3
- 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 +11 -3
- package/plugins/zoom/lg-zoom.umd.js.map +1 -1
- package/react/Lightgallery.d.ts +5 -1
- package/react/Lightgallery.es5.js +201 -136
- package/react/Lightgallery.es5.js.map +1 -1
- package/react/Lightgallery.umd.js +201 -136
- package/react/Lightgallery.umd.js.map +1 -1
- package/scss/lightgallery-core.scss +0 -1
- package/vue/LightGallery.vue.d.ts +5 -1
- package/vue/LightGalleryVue.common.js +314 -264
- package/vue/LightGalleryVue.common.js.map +1 -1
- package/vue/LightGalleryVue.umd.js +314 -264
- 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
|
@@ -4859,7 +4859,7 @@ if (typeof window !== 'undefined') {
|
|
|
4859
4859
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
4860
4860
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
4861
4861
|
|
|
4862
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./src/components/LightGallery.vue?vue&type=template&id=
|
|
4862
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./src/components/LightGallery.vue?vue&type=template&id=47173610
|
|
4863
4863
|
|
|
4864
4864
|
var _hoisted_1 = {
|
|
4865
4865
|
ref: "container",
|
|
@@ -4868,7 +4868,7 @@ var _hoisted_1 = {
|
|
|
4868
4868
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4869
4869
|
return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])("div", _hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderSlot"])(_ctx.$slots, "default")], 512);
|
|
4870
4870
|
}
|
|
4871
|
-
// CONCATENATED MODULE: ./src/components/LightGallery.vue?vue&type=template&id=
|
|
4871
|
+
// CONCATENATED MODULE: ./src/components/LightGallery.vue?vue&type=template&id=47173610
|
|
4872
4872
|
|
|
4873
4873
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
|
|
4874
4874
|
var es_object_keys = __webpack_require__("b64b");
|
|
@@ -5814,6 +5814,116 @@ var es_array_concat = __webpack_require__("99af");
|
|
|
5814
5814
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
|
|
5815
5815
|
var es_array_find = __webpack_require__("7db0");
|
|
5816
5816
|
|
|
5817
|
+
// CONCATENATED MODULE: ../src/lg-events.ts
|
|
5818
|
+
/**
|
|
5819
|
+
* List of lightGallery events
|
|
5820
|
+
* All events should be documented here
|
|
5821
|
+
* Below interfaces are used to build the website documentations
|
|
5822
|
+
* */
|
|
5823
|
+
var lGEvents = {
|
|
5824
|
+
afterAppendSlide: 'lgAfterAppendSlide',
|
|
5825
|
+
init: 'lgInit',
|
|
5826
|
+
hasVideo: 'lgHasVideo',
|
|
5827
|
+
containerResize: 'lgContainerResize',
|
|
5828
|
+
updateSlides: 'lgUpdateSlides',
|
|
5829
|
+
afterAppendSubHtml: 'lgAfterAppendSubHtml',
|
|
5830
|
+
beforeOpen: 'lgBeforeOpen',
|
|
5831
|
+
afterOpen: 'lgAfterOpen',
|
|
5832
|
+
slideItemLoad: 'lgSlideItemLoad',
|
|
5833
|
+
beforeSlide: 'lgBeforeSlide',
|
|
5834
|
+
afterSlide: 'lgAfterSlide',
|
|
5835
|
+
posterClick: 'lgPosterClick',
|
|
5836
|
+
dragStart: 'lgDragStart',
|
|
5837
|
+
dragMove: 'lgDragMove',
|
|
5838
|
+
dragEnd: 'lgDragEnd',
|
|
5839
|
+
beforeNextSlide: 'lgBeforeNextSlide',
|
|
5840
|
+
beforePrevSlide: 'lgBeforePrevSlide',
|
|
5841
|
+
beforeClose: 'lgBeforeClose',
|
|
5842
|
+
afterClose: 'lgAfterClose',
|
|
5843
|
+
rotateLeft: 'lgRotateLeft',
|
|
5844
|
+
rotateRight: 'lgRotateRight',
|
|
5845
|
+
flipHorizontal: 'lgFlipHorizontal',
|
|
5846
|
+
flipVertical: 'lgFlipVertical',
|
|
5847
|
+
autoplay: 'lgAutoplay',
|
|
5848
|
+
autoplayStart: 'lgAutoplayStart',
|
|
5849
|
+
autoplayStop: 'lgAutoplayStop'
|
|
5850
|
+
};
|
|
5851
|
+
// CONCATENATED MODULE: ../src/lg-settings.ts
|
|
5852
|
+
var lightGalleryCoreSettings = {
|
|
5853
|
+
mode: 'lg-slide',
|
|
5854
|
+
easing: 'ease',
|
|
5855
|
+
speed: 400,
|
|
5856
|
+
licenseKey: '0000-0000-000-0000',
|
|
5857
|
+
height: '100%',
|
|
5858
|
+
width: '100%',
|
|
5859
|
+
addClass: '',
|
|
5860
|
+
startClass: 'lg-start-zoom',
|
|
5861
|
+
backdropDuration: 300,
|
|
5862
|
+
container: '',
|
|
5863
|
+
startAnimationDuration: 400,
|
|
5864
|
+
zoomFromOrigin: true,
|
|
5865
|
+
hideBarsDelay: 0,
|
|
5866
|
+
showBarsAfter: 10000,
|
|
5867
|
+
slideDelay: 0,
|
|
5868
|
+
supportLegacyBrowser: true,
|
|
5869
|
+
allowMediaOverlap: false,
|
|
5870
|
+
videoMaxSize: '1280-720',
|
|
5871
|
+
loadYouTubePoster: true,
|
|
5872
|
+
defaultCaptionHeight: 0,
|
|
5873
|
+
ariaLabelledby: '',
|
|
5874
|
+
ariaDescribedby: '',
|
|
5875
|
+
closable: true,
|
|
5876
|
+
swipeToClose: true,
|
|
5877
|
+
closeOnTap: true,
|
|
5878
|
+
showCloseIcon: true,
|
|
5879
|
+
showMaximizeIcon: false,
|
|
5880
|
+
loop: true,
|
|
5881
|
+
escKey: true,
|
|
5882
|
+
keyPress: true,
|
|
5883
|
+
controls: true,
|
|
5884
|
+
slideEndAnimation: true,
|
|
5885
|
+
hideControlOnEnd: false,
|
|
5886
|
+
mousewheel: false,
|
|
5887
|
+
getCaptionFromTitleOrAlt: true,
|
|
5888
|
+
appendSubHtmlTo: '.lg-sub-html',
|
|
5889
|
+
subHtmlSelectorRelative: false,
|
|
5890
|
+
preload: 2,
|
|
5891
|
+
numberOfSlideItemsInDom: 10,
|
|
5892
|
+
selector: '',
|
|
5893
|
+
selectWithin: '',
|
|
5894
|
+
nextHtml: '',
|
|
5895
|
+
prevHtml: '',
|
|
5896
|
+
index: 0,
|
|
5897
|
+
iframeWidth: '100%',
|
|
5898
|
+
iframeHeight: '100%',
|
|
5899
|
+
iframeMaxWidth: '100%',
|
|
5900
|
+
iframeMaxHeight: '100%',
|
|
5901
|
+
download: true,
|
|
5902
|
+
counter: true,
|
|
5903
|
+
appendCounterTo: '.lg-toolbar',
|
|
5904
|
+
swipeThreshold: 50,
|
|
5905
|
+
enableSwipe: true,
|
|
5906
|
+
enableDrag: true,
|
|
5907
|
+
dynamic: false,
|
|
5908
|
+
dynamicEl: [],
|
|
5909
|
+
extraProps: [],
|
|
5910
|
+
exThumbImage: '',
|
|
5911
|
+
isMobile: undefined,
|
|
5912
|
+
mobileSettings: {
|
|
5913
|
+
controls: false,
|
|
5914
|
+
showCloseIcon: false,
|
|
5915
|
+
download: false
|
|
5916
|
+
},
|
|
5917
|
+
plugins: [],
|
|
5918
|
+
strings: {
|
|
5919
|
+
closeGallery: 'Close gallery',
|
|
5920
|
+
toggleMaximize: 'Toggle maximize',
|
|
5921
|
+
previousSlide: 'Previous slide',
|
|
5922
|
+
nextSlide: 'Next slide',
|
|
5923
|
+
download: 'Download',
|
|
5924
|
+
playVideo: 'Play video'
|
|
5925
|
+
}
|
|
5926
|
+
};
|
|
5817
5927
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
|
5818
5928
|
function arrayLikeToArray_arrayLikeToArray(arr, len) {
|
|
5819
5929
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -5924,28 +6034,30 @@ var es_regexp_to_string = __webpack_require__("25f0");
|
|
|
5924
6034
|
|
|
5925
6035
|
|
|
5926
6036
|
|
|
5927
|
-
|
|
5928
|
-
|
|
6037
|
+
function initLgPolyfills() {
|
|
6038
|
+
(function () {
|
|
6039
|
+
if (typeof window.CustomEvent === 'function') return false;
|
|
5929
6040
|
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
6041
|
+
function CustomEvent(event, params) {
|
|
6042
|
+
params = params || {
|
|
6043
|
+
bubbles: false,
|
|
6044
|
+
cancelable: false,
|
|
6045
|
+
detail: null
|
|
6046
|
+
};
|
|
6047
|
+
var evt = document.createEvent('CustomEvent');
|
|
6048
|
+
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
6049
|
+
return evt;
|
|
6050
|
+
}
|
|
5940
6051
|
|
|
5941
|
-
|
|
5942
|
-
})();
|
|
6052
|
+
window.CustomEvent = CustomEvent;
|
|
6053
|
+
})();
|
|
5943
6054
|
|
|
5944
|
-
(function () {
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
})();
|
|
6055
|
+
(function () {
|
|
6056
|
+
if (!Element.prototype.matches) {
|
|
6057
|
+
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
6058
|
+
}
|
|
6059
|
+
})();
|
|
6060
|
+
}
|
|
5949
6061
|
|
|
5950
6062
|
var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
5951
6063
|
function lgQuery(selector) {
|
|
@@ -6247,7 +6359,9 @@ var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
|
6247
6359
|
var _this5 = this;
|
|
6248
6360
|
|
|
6249
6361
|
fetch(url).then(function (res) {
|
|
6250
|
-
|
|
6362
|
+
return res.text();
|
|
6363
|
+
}).then(function (html) {
|
|
6364
|
+
_this5.selector.innerHTML = html;
|
|
6251
6365
|
});
|
|
6252
6366
|
return this;
|
|
6253
6367
|
}
|
|
@@ -6386,6 +6500,7 @@ var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
|
6386
6500
|
}();
|
|
6387
6501
|
lgQuery_lgQuery.eventListeners = {};
|
|
6388
6502
|
function $LG(selector) {
|
|
6503
|
+
initLgPolyfills();
|
|
6389
6504
|
return new lgQuery_lgQuery(selector);
|
|
6390
6505
|
}
|
|
6391
6506
|
// CONCATENATED MODULE: ../src/lg-utils.ts
|
|
@@ -6497,9 +6612,9 @@ var utils = {
|
|
|
6497
6612
|
var transform = 'translate3d(' + (x *= -1) + 'px, ' + (y *= -1) + 'px, 0) scale3d(' + scX + ', ' + scY + ', 1)';
|
|
6498
6613
|
return transform;
|
|
6499
6614
|
},
|
|
6500
|
-
getIframeMarkup: function getIframeMarkup(iframeWidth, iframeHeight, src, iframeTitle) {
|
|
6615
|
+
getIframeMarkup: function getIframeMarkup(iframeWidth, iframeHeight, iframeMaxWidth, iframeMaxHeight, src, iframeTitle) {
|
|
6501
6616
|
var title = iframeTitle ? 'title="' + iframeTitle + '"' : '';
|
|
6502
|
-
return "<div class=\"lg-video-cont lg-has-iframe\" style=\"width:".concat(iframeWidth, "; height: ").concat(iframeHeight, "\">\n <iframe class=\"lg-object\" frameborder=\"0\" ").concat(title, " src=\"").concat(src, "\" allowfullscreen=\"true\"></iframe>\n </div>");
|
|
6617
|
+
return "<div class=\"lg-video-cont lg-has-iframe\" style=\"width:".concat(iframeWidth, "; max-width:").concat(iframeMaxWidth, "; height: ").concat(iframeHeight, "; max-height:").concat(iframeMaxHeight, "\">\n <iframe class=\"lg-object\" frameborder=\"0\" ").concat(title, " src=\"").concat(src, "\" allowfullscreen=\"true\"></iframe>\n </div>");
|
|
6503
6618
|
},
|
|
6504
6619
|
getImgMarkup: function getImgMarkup(index, src, altAttr, srcset, sizes, sources) {
|
|
6505
6620
|
var srcsetAttr = srcset ? "srcset=\"".concat(srcset, "\"") : '';
|
|
@@ -6569,7 +6684,7 @@ var utils = {
|
|
|
6569
6684
|
|
|
6570
6685
|
return true;
|
|
6571
6686
|
},
|
|
6572
|
-
getVideoPosterMarkup: function getVideoPosterMarkup(_poster, dummyImg, videoContStyle, _isVideo) {
|
|
6687
|
+
getVideoPosterMarkup: function getVideoPosterMarkup(_poster, dummyImg, videoContStyle, playVideoString, _isVideo) {
|
|
6573
6688
|
var videoClass = '';
|
|
6574
6689
|
|
|
6575
6690
|
if (_isVideo && _isVideo.youtube) {
|
|
@@ -6580,7 +6695,7 @@ var utils = {
|
|
|
6580
6695
|
videoClass = 'lg-has-html5';
|
|
6581
6696
|
}
|
|
6582
6697
|
|
|
6583
|
-
return "<div class=\"lg-video-cont ".concat(videoClass, "\" style=\"").concat(videoContStyle, "\">\n <div class=\"lg-video-play-button\">\n <svg\n viewBox=\"0 0 20 20\"\n preserveAspectRatio=\"xMidYMid\"\n focusable=\"false\"\n aria-labelledby=\"
|
|
6698
|
+
return "<div class=\"lg-video-cont ".concat(videoClass, "\" style=\"").concat(videoContStyle, "\">\n <div class=\"lg-video-play-button\">\n <svg\n viewBox=\"0 0 20 20\"\n preserveAspectRatio=\"xMidYMid\"\n focusable=\"false\"\n aria-labelledby=\"").concat(playVideoString, "\"\n role=\"img\"\n class=\"lg-video-play-icon\"\n >\n <title>").concat(playVideoString, "</title>\n <polygon class=\"lg-video-play-icon-inner\" points=\"1,0 20,10 1,20\"></polygon>\n </svg>\n <svg class=\"lg-video-play-icon-bg\" viewBox=\"0 0 50 50\" focusable=\"false\">\n <circle cx=\"50%\" cy=\"50%\" r=\"20\"></circle></svg>\n <svg class=\"lg-video-play-icon-circle\" viewBox=\"0 0 50 50\" focusable=\"false\">\n <circle cx=\"50%\" cy=\"50%\" r=\"20\"></circle>\n </svg>\n </div>\n ").concat(dummyImg || '', "\n <img class=\"lg-object lg-video-poster\" src=\"").concat(_poster, "\" />\n </div>");
|
|
6584
6699
|
},
|
|
6585
6700
|
|
|
6586
6701
|
/**
|
|
@@ -6672,102 +6787,6 @@ var utils = {
|
|
|
6672
6787
|
}
|
|
6673
6788
|
};
|
|
6674
6789
|
/* harmony default export */ var lg_utils = (utils);
|
|
6675
|
-
// CONCATENATED MODULE: ../src/lg-settings.ts
|
|
6676
|
-
var lightGalleryCoreSettings = {
|
|
6677
|
-
mode: 'lg-slide',
|
|
6678
|
-
easing: 'ease',
|
|
6679
|
-
speed: 400,
|
|
6680
|
-
licenseKey: '0000-0000-000-0000',
|
|
6681
|
-
height: '100%',
|
|
6682
|
-
width: '100%',
|
|
6683
|
-
addClass: '',
|
|
6684
|
-
startClass: 'lg-start-zoom',
|
|
6685
|
-
backdropDuration: 300,
|
|
6686
|
-
container: document.body,
|
|
6687
|
-
startAnimationDuration: 400,
|
|
6688
|
-
zoomFromOrigin: true,
|
|
6689
|
-
hideBarsDelay: 0,
|
|
6690
|
-
showBarsAfter: 10000,
|
|
6691
|
-
slideDelay: 0,
|
|
6692
|
-
supportLegacyBrowser: true,
|
|
6693
|
-
allowMediaOverlap: false,
|
|
6694
|
-
videoMaxSize: '1280-720',
|
|
6695
|
-
defaultCaptionHeight: 0,
|
|
6696
|
-
ariaLabelledby: '',
|
|
6697
|
-
ariaDescribedby: '',
|
|
6698
|
-
closable: true,
|
|
6699
|
-
swipeToClose: true,
|
|
6700
|
-
closeOnTap: true,
|
|
6701
|
-
showCloseIcon: true,
|
|
6702
|
-
showMaximizeIcon: false,
|
|
6703
|
-
loop: true,
|
|
6704
|
-
escKey: true,
|
|
6705
|
-
keyPress: true,
|
|
6706
|
-
controls: true,
|
|
6707
|
-
slideEndAnimation: true,
|
|
6708
|
-
hideControlOnEnd: false,
|
|
6709
|
-
mousewheel: false,
|
|
6710
|
-
getCaptionFromTitleOrAlt: true,
|
|
6711
|
-
appendSubHtmlTo: '.lg-sub-html',
|
|
6712
|
-
subHtmlSelectorRelative: false,
|
|
6713
|
-
preload: 2,
|
|
6714
|
-
numberOfSlideItemsInDom: 10,
|
|
6715
|
-
selector: '',
|
|
6716
|
-
selectWithin: '',
|
|
6717
|
-
nextHtml: '',
|
|
6718
|
-
prevHtml: '',
|
|
6719
|
-
index: 0,
|
|
6720
|
-
iframeWidth: '100%',
|
|
6721
|
-
iframeHeight: '100%',
|
|
6722
|
-
download: true,
|
|
6723
|
-
counter: true,
|
|
6724
|
-
appendCounterTo: '.lg-toolbar',
|
|
6725
|
-
swipeThreshold: 50,
|
|
6726
|
-
enableSwipe: true,
|
|
6727
|
-
enableDrag: true,
|
|
6728
|
-
dynamic: false,
|
|
6729
|
-
dynamicEl: [],
|
|
6730
|
-
extraProps: [],
|
|
6731
|
-
exThumbImage: '',
|
|
6732
|
-
isMobile: undefined,
|
|
6733
|
-
mobileSettings: {
|
|
6734
|
-
controls: false,
|
|
6735
|
-
showCloseIcon: false,
|
|
6736
|
-
download: false
|
|
6737
|
-
},
|
|
6738
|
-
plugins: []
|
|
6739
|
-
};
|
|
6740
|
-
// CONCATENATED MODULE: ../src/lg-events.ts
|
|
6741
|
-
/**
|
|
6742
|
-
* List of lightGallery events
|
|
6743
|
-
* All events should be documented here
|
|
6744
|
-
* Below interfaces are used to build the website documentations
|
|
6745
|
-
* */
|
|
6746
|
-
var lGEvents = {
|
|
6747
|
-
afterAppendSlide: 'lgAfterAppendSlide',
|
|
6748
|
-
init: 'lgInit',
|
|
6749
|
-
hasVideo: 'lgHasVideo',
|
|
6750
|
-
containerResize: 'lgContainerResize',
|
|
6751
|
-
updateSlides: 'lgUpdateSlides',
|
|
6752
|
-
afterAppendSubHtml: 'lgAfterAppendSubHtml',
|
|
6753
|
-
beforeOpen: 'lgBeforeOpen',
|
|
6754
|
-
afterOpen: 'lgAfterOpen',
|
|
6755
|
-
slideItemLoad: 'lgSlideItemLoad',
|
|
6756
|
-
beforeSlide: 'lgBeforeSlide',
|
|
6757
|
-
afterSlide: 'lgAfterSlide',
|
|
6758
|
-
posterClick: 'lgPosterClick',
|
|
6759
|
-
dragStart: 'lgDragStart',
|
|
6760
|
-
dragMove: 'lgDragMove',
|
|
6761
|
-
dragEnd: 'lgDragEnd',
|
|
6762
|
-
beforeNextSlide: 'lgBeforeNextSlide',
|
|
6763
|
-
beforePrevSlide: 'lgBeforePrevSlide',
|
|
6764
|
-
beforeClose: 'lgBeforeClose',
|
|
6765
|
-
afterClose: 'lgAfterClose',
|
|
6766
|
-
rotateLeft: 'lgRotateLeft',
|
|
6767
|
-
rotateRight: 'lgRotateRight',
|
|
6768
|
-
flipHorizontal: 'lgFlipHorizontal',
|
|
6769
|
-
flipVertical: 'lgFlipVertical'
|
|
6770
|
-
};
|
|
6771
6790
|
// CONCATENATED MODULE: ../src/lightgallery.ts
|
|
6772
6791
|
|
|
6773
6792
|
|
|
@@ -6993,7 +7012,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
6993
7012
|
var subHtmlCont = ''; // Create controls
|
|
6994
7013
|
|
|
6995
7014
|
if (this.settings.controls) {
|
|
6996
|
-
controls = "<button type=\"button\" id=\"".concat(this.getIdName('lg-prev'), "\" aria-label=\"
|
|
7015
|
+
controls = "<button type=\"button\" id=\"".concat(this.getIdName('lg-prev'), "\" aria-label=\"").concat(this.settings.strings['previousSlide'], "\" class=\"lg-prev lg-icon\"> ").concat(this.settings.prevHtml, " </button>\n <button type=\"button\" id=\"").concat(this.getIdName('lg-next'), "\" aria-label=\"").concat(this.settings.strings['nextSlide'], "\" class=\"lg-next lg-icon\"> ").concat(this.settings.nextHtml, " </button>");
|
|
6997
7016
|
}
|
|
6998
7017
|
|
|
6999
7018
|
if (this.settings.appendSubHtmlTo !== '.lg-item') {
|
|
@@ -7010,10 +7029,15 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7010
7029
|
var ariaLabelledby = this.settings.ariaLabelledby ? 'aria-labelledby="' + this.settings.ariaLabelledby + '"' : '';
|
|
7011
7030
|
var ariaDescribedby = this.settings.ariaDescribedby ? 'aria-describedby="' + this.settings.ariaDescribedby + '"' : '';
|
|
7012
7031
|
var containerClassName = "lg-container ".concat(this.settings.addClass, " ").concat(document.body !== this.settings.container ? 'lg-inline' : '');
|
|
7013
|
-
var closeIcon = this.settings.closable && this.settings.showCloseIcon ? "<button type=\"button\" aria-label=\"
|
|
7014
|
-
var maximizeIcon = this.settings.showMaximizeIcon ? "<button type=\"button\" aria-label=\"
|
|
7032
|
+
var closeIcon = this.settings.closable && this.settings.showCloseIcon ? "<button type=\"button\" aria-label=\"".concat(this.settings.strings['closeGallery'], "\" id=\"").concat(this.getIdName('lg-close'), "\" class=\"lg-close lg-icon\"></button>") : '';
|
|
7033
|
+
var maximizeIcon = this.settings.showMaximizeIcon ? "<button type=\"button\" aria-label=\"".concat(this.settings.strings['toggleMaximize'], "\" id=\"").concat(this.getIdName('lg-maximize'), "\" class=\"lg-maximize lg-icon\"></button>") : '';
|
|
7015
7034
|
var template = "\n <div class=\"".concat(containerClassName, "\" id=\"").concat(this.getIdName('lg-container'), "\" tabindex=\"-1\" aria-modal=\"true\" ").concat(ariaLabelledby, " ").concat(ariaDescribedby, " role=\"dialog\"\n >\n <div id=\"").concat(this.getIdName('lg-backdrop'), "\" class=\"lg-backdrop\"></div>\n\n <div id=\"").concat(this.getIdName('lg-outer'), "\" class=\"lg-outer lg-use-css3 lg-css3 lg-hide-items ").concat(addClasses, " \">\n\n <div id=\"").concat(this.getIdName('lg-content'), "\" class=\"lg-content\">\n <div id=\"").concat(this.getIdName('lg-inner'), "\" class=\"lg-inner\">\n </div>\n ").concat(controls, "\n </div>\n <div id=\"").concat(this.getIdName('lg-toolbar'), "\" class=\"lg-toolbar lg-group\">\n ").concat(maximizeIcon, "\n ").concat(closeIcon, "\n </div>\n ").concat(this.settings.appendSubHtmlTo === '.lg-outer' ? subHtmlCont : '', "\n <div id=\"").concat(this.getIdName('lg-components'), "\" class=\"lg-components\">\n ").concat(this.settings.appendSubHtmlTo === '.lg-sub-html' ? subHtmlCont : '', "\n </div>\n </div>\n </div>\n ");
|
|
7016
|
-
$LG(this.settings.container).
|
|
7035
|
+
$LG(this.settings.container).append(template);
|
|
7036
|
+
|
|
7037
|
+
if (document.body !== this.settings.container) {
|
|
7038
|
+
$LG(this.settings.container).css('position', 'relative');
|
|
7039
|
+
}
|
|
7040
|
+
|
|
7017
7041
|
this.outer = this.getElementById('lg-outer');
|
|
7018
7042
|
this.$lgComponents = this.getElementById('lg-components');
|
|
7019
7043
|
this.$backdrop = this.getElementById('lg-backdrop');
|
|
@@ -7034,7 +7058,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7034
7058
|
this.$inner.css('transition-duration', this.settings.speed + 'ms');
|
|
7035
7059
|
|
|
7036
7060
|
if (this.settings.download) {
|
|
7037
|
-
this.$toolbar.append("<a id=\"".concat(this.getIdName('lg-download'), "\" target=\"_blank\" rel=\"noopener\" aria-label=\"
|
|
7061
|
+
this.$toolbar.append("<a id=\"".concat(this.getIdName('lg-download'), "\" target=\"_blank\" rel=\"noopener\" aria-label=\"").concat(this.settings.strings['download'], "\" download class=\"lg-download lg-icon\"></a>"));
|
|
7038
7062
|
}
|
|
7039
7063
|
|
|
7040
7064
|
this.counter();
|
|
@@ -7613,8 +7637,14 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7613
7637
|
}, {
|
|
7614
7638
|
key: "addSlideVideoInfo",
|
|
7615
7639
|
value: function addSlideVideoInfo(items) {
|
|
7640
|
+
var _this9 = this;
|
|
7641
|
+
|
|
7616
7642
|
items.forEach(function (element, index) {
|
|
7617
7643
|
element.__slideVideoInfo = lg_utils.isVideo(element.src, !!element.video, index);
|
|
7644
|
+
|
|
7645
|
+
if (element.__slideVideoInfo && _this9.settings.loadYouTubePoster && !element.poster && element.__slideVideoInfo.youtube) {
|
|
7646
|
+
element.poster = "//img.youtube.com/vi/".concat(element.__slideVideoInfo.youtube[1], "/maxresdefault.jpg");
|
|
7647
|
+
}
|
|
7618
7648
|
});
|
|
7619
7649
|
}
|
|
7620
7650
|
/**
|
|
@@ -7627,7 +7657,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7627
7657
|
}, {
|
|
7628
7658
|
key: "loadContent",
|
|
7629
7659
|
value: function loadContent(index, rec) {
|
|
7630
|
-
var
|
|
7660
|
+
var _this10 = this;
|
|
7631
7661
|
|
|
7632
7662
|
var currentGalleryItem = this.galleryItems[index];
|
|
7633
7663
|
var $currentSlide = $LG(this.getSlideItemId(index));
|
|
@@ -7670,7 +7700,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7670
7700
|
}
|
|
7671
7701
|
|
|
7672
7702
|
if (iframe) {
|
|
7673
|
-
var markup = lg_utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, src, currentGalleryItem.iframeTitle);
|
|
7703
|
+
var markup = lg_utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, this.settings.iframeMaxWidth, this.settings.iframeMaxHeight, src, currentGalleryItem.iframeTitle);
|
|
7674
7704
|
$currentSlide.prepend(markup);
|
|
7675
7705
|
} else if (poster) {
|
|
7676
7706
|
var dummyImg = '';
|
|
@@ -7680,7 +7710,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7680
7710
|
dummyImg = this.getDummyImageContent($currentSlide, index, '');
|
|
7681
7711
|
}
|
|
7682
7712
|
|
|
7683
|
-
var _markup = lg_utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, videoInfo);
|
|
7713
|
+
var _markup = lg_utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, this.settings.strings['playVideo'], videoInfo);
|
|
7684
7714
|
|
|
7685
7715
|
$currentSlide.prepend(_markup);
|
|
7686
7716
|
} else if (videoInfo) {
|
|
@@ -7730,24 +7760,24 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7730
7760
|
|
|
7731
7761
|
if (!$currentSlide.hasClass('lg-loaded')) {
|
|
7732
7762
|
setTimeout(function () {
|
|
7733
|
-
if (
|
|
7763
|
+
if (_this10.getSlideType(currentGalleryItem) === 'image') {
|
|
7734
7764
|
$currentSlide.find('.lg-img-wrap').append(lg_utils.getImgMarkup(index, src, '', srcset, sizes, currentGalleryItem.sources));
|
|
7735
7765
|
|
|
7736
7766
|
if (srcset || sources) {
|
|
7737
7767
|
var _$img = $currentSlide.find('.lg-object');
|
|
7738
7768
|
|
|
7739
|
-
|
|
7769
|
+
_this10.initPictureFill(_$img);
|
|
7740
7770
|
}
|
|
7741
7771
|
}
|
|
7742
7772
|
|
|
7743
|
-
if (
|
|
7744
|
-
|
|
7773
|
+
if (_this10.getSlideType(currentGalleryItem) === 'image' || _this10.getSlideType(currentGalleryItem) === 'video' && poster) {
|
|
7774
|
+
_this10.onLgObjectLoad($currentSlide, index, delay, _speed, true, false); // load remaining slides once the slide is completely loaded
|
|
7745
7775
|
|
|
7746
7776
|
|
|
7747
|
-
|
|
7748
|
-
|
|
7777
|
+
_this10.onSlideObjectLoad($currentSlide, !!(videoInfo && videoInfo.html5 && !poster), function () {
|
|
7778
|
+
_this10.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);
|
|
7749
7779
|
}, function () {
|
|
7750
|
-
|
|
7780
|
+
_this10.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);
|
|
7751
7781
|
});
|
|
7752
7782
|
}
|
|
7753
7783
|
}, this.settings.startAnimationDuration + 100);
|
|
@@ -7775,7 +7805,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7775
7805
|
if (rec === true) {
|
|
7776
7806
|
if (!$currentSlide.hasClass('lg-complete_')) {
|
|
7777
7807
|
$currentSlide.find('.lg-object').first().on('load.lg error.lg', function () {
|
|
7778
|
-
|
|
7808
|
+
_this10.preload(index);
|
|
7779
7809
|
});
|
|
7780
7810
|
} else {
|
|
7781
7811
|
this.preload(index);
|
|
@@ -7793,23 +7823,23 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7793
7823
|
}, {
|
|
7794
7824
|
key: "loadContentOnFirstSlideLoad",
|
|
7795
7825
|
value: function loadContentOnFirstSlideLoad(index, $currentSlide, speed) {
|
|
7796
|
-
var
|
|
7826
|
+
var _this11 = this;
|
|
7797
7827
|
|
|
7798
7828
|
setTimeout(function () {
|
|
7799
7829
|
$currentSlide.find('.lg-dummy-img').remove();
|
|
7800
7830
|
$currentSlide.removeClass('lg-first-slide');
|
|
7801
7831
|
|
|
7802
|
-
|
|
7832
|
+
_this11.outer.removeClass('lg-first-slide-loading');
|
|
7803
7833
|
|
|
7804
|
-
|
|
7834
|
+
_this11.isDummyImageRemoved = true;
|
|
7805
7835
|
|
|
7806
|
-
|
|
7836
|
+
_this11.preload(index);
|
|
7807
7837
|
}, speed + 300);
|
|
7808
7838
|
}
|
|
7809
7839
|
}, {
|
|
7810
7840
|
key: "getItemsToBeInsertedToDom",
|
|
7811
7841
|
value: function getItemsToBeInsertedToDom(index, prevIndex) {
|
|
7812
|
-
var
|
|
7842
|
+
var _this12 = this;
|
|
7813
7843
|
|
|
7814
7844
|
var numberOfItems = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
7815
7845
|
var itemsToBeInsertedToDom = []; // Minimum 2 items should be there
|
|
@@ -7820,7 +7850,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7820
7850
|
|
|
7821
7851
|
if (this.galleryItems.length <= 3) {
|
|
7822
7852
|
this.galleryItems.forEach(function (_element, index) {
|
|
7823
|
-
itemsToBeInsertedToDom.push("lg-item-".concat(
|
|
7853
|
+
itemsToBeInsertedToDom.push("lg-item-".concat(_this12.lgId, "-").concat(index));
|
|
7824
7854
|
});
|
|
7825
7855
|
return itemsToBeInsertedToDom;
|
|
7826
7856
|
}
|
|
@@ -7864,12 +7894,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7864
7894
|
}, {
|
|
7865
7895
|
key: "organizeSlideItems",
|
|
7866
7896
|
value: function organizeSlideItems(index, prevIndex) {
|
|
7867
|
-
var
|
|
7897
|
+
var _this13 = this;
|
|
7868
7898
|
|
|
7869
7899
|
var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, prevIndex, this.settings.numberOfSlideItemsInDom);
|
|
7870
7900
|
itemsToBeInsertedToDom.forEach(function (item) {
|
|
7871
|
-
if (
|
|
7872
|
-
|
|
7901
|
+
if (_this13.currentItemsInDom.indexOf(item) === -1) {
|
|
7902
|
+
_this13.$inner.append("<div id=\"".concat(item, "\" class=\"lg-item\"></div>"));
|
|
7873
7903
|
}
|
|
7874
7904
|
});
|
|
7875
7905
|
this.currentItemsInDom.forEach(function (item) {
|
|
@@ -7920,7 +7950,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7920
7950
|
}, {
|
|
7921
7951
|
key: "makeSlideAnimation",
|
|
7922
7952
|
value: function makeSlideAnimation(direction, currentSlideItem, previousSlideItem) {
|
|
7923
|
-
var
|
|
7953
|
+
var _this14 = this;
|
|
7924
7954
|
|
|
7925
7955
|
if (this.lGalleryOn) {
|
|
7926
7956
|
previousSlideItem.addClass('lg-slide-progress');
|
|
@@ -7928,9 +7958,9 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7928
7958
|
|
|
7929
7959
|
setTimeout(function () {
|
|
7930
7960
|
// remove all transitions
|
|
7931
|
-
|
|
7961
|
+
_this14.outer.addClass('lg-no-trans');
|
|
7932
7962
|
|
|
7933
|
-
|
|
7963
|
+
_this14.outer.find('.lg-item').removeClass('lg-prev-slide lg-next-slide');
|
|
7934
7964
|
|
|
7935
7965
|
if (direction === 'prev') {
|
|
7936
7966
|
//prevslide
|
|
@@ -7944,11 +7974,11 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7944
7974
|
|
|
7945
7975
|
|
|
7946
7976
|
setTimeout(function () {
|
|
7947
|
-
|
|
7977
|
+
_this14.outer.find('.lg-item').removeClass('lg-current');
|
|
7948
7978
|
|
|
7949
7979
|
currentSlideItem.addClass('lg-current'); // reset all transitions
|
|
7950
7980
|
|
|
7951
|
-
|
|
7981
|
+
_this14.outer.removeClass('lg-no-trans');
|
|
7952
7982
|
}, 50);
|
|
7953
7983
|
}, this.lGalleryOn ? this.settings.slideDelay : 0);
|
|
7954
7984
|
}
|
|
@@ -7969,7 +7999,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7969
7999
|
}, {
|
|
7970
8000
|
key: "slide",
|
|
7971
8001
|
value: function slide(index, fromTouch, fromThumb, direction) {
|
|
7972
|
-
var
|
|
8002
|
+
var _this15 = this;
|
|
7973
8003
|
|
|
7974
8004
|
var prevIndex = this.getPreviousSlideIndex();
|
|
7975
8005
|
this.currentItemsInDom = this.organizeSlideItems(index, prevIndex); // Prevent multiple call, Required for hsh plugin
|
|
@@ -8057,20 +8087,20 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8057
8087
|
this.loadContent(index, true);
|
|
8058
8088
|
} else {
|
|
8059
8089
|
setTimeout(function () {
|
|
8060
|
-
|
|
8090
|
+
_this15.loadContent(index, true); // Add title if this.settings.appendSubHtmlTo === lg-sub-html
|
|
8061
8091
|
|
|
8062
8092
|
|
|
8063
|
-
if (
|
|
8064
|
-
|
|
8093
|
+
if (_this15.settings.appendSubHtmlTo !== '.lg-item') {
|
|
8094
|
+
_this15.addHtml(index);
|
|
8065
8095
|
}
|
|
8066
8096
|
}, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay));
|
|
8067
8097
|
}
|
|
8068
8098
|
|
|
8069
8099
|
setTimeout(function () {
|
|
8070
|
-
|
|
8100
|
+
_this15.lgBusy = false;
|
|
8071
8101
|
previousSlideItem.removeClass('lg-slide-progress');
|
|
8072
8102
|
|
|
8073
|
-
|
|
8103
|
+
_this15.LGel.trigger(lGEvents.afterSlide, {
|
|
8074
8104
|
prevIndex: prevIndex,
|
|
8075
8105
|
index: index,
|
|
8076
8106
|
fromTouch: fromTouch,
|
|
@@ -8157,7 +8187,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8157
8187
|
}, {
|
|
8158
8188
|
key: "touchEnd",
|
|
8159
8189
|
value: function touchEnd(endCoords, startCoords, event) {
|
|
8160
|
-
var
|
|
8190
|
+
var _this16 = this;
|
|
8161
8191
|
|
|
8162
8192
|
var distance; // keep slide animation for any mode while dragg/swipe
|
|
8163
8193
|
|
|
@@ -8167,61 +8197,61 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8167
8197
|
|
|
8168
8198
|
|
|
8169
8199
|
setTimeout(function () {
|
|
8170
|
-
|
|
8200
|
+
_this16.$container.removeClass('lg-dragging-vertical');
|
|
8171
8201
|
|
|
8172
|
-
|
|
8202
|
+
_this16.outer.removeClass('lg-dragging lg-hide-items').addClass('lg-components-open');
|
|
8173
8203
|
|
|
8174
8204
|
var triggerClick = true;
|
|
8175
8205
|
|
|
8176
|
-
if (
|
|
8206
|
+
if (_this16.swipeDirection === 'horizontal') {
|
|
8177
8207
|
distance = endCoords.pageX - startCoords.pageX;
|
|
8178
8208
|
var distanceAbs = Math.abs(endCoords.pageX - startCoords.pageX);
|
|
8179
8209
|
|
|
8180
|
-
if (distance < 0 && distanceAbs >
|
|
8181
|
-
|
|
8210
|
+
if (distance < 0 && distanceAbs > _this16.settings.swipeThreshold) {
|
|
8211
|
+
_this16.goToNextSlide(true);
|
|
8182
8212
|
|
|
8183
8213
|
triggerClick = false;
|
|
8184
|
-
} else if (distance > 0 && distanceAbs >
|
|
8185
|
-
|
|
8214
|
+
} else if (distance > 0 && distanceAbs > _this16.settings.swipeThreshold) {
|
|
8215
|
+
_this16.goToPrevSlide(true);
|
|
8186
8216
|
|
|
8187
8217
|
triggerClick = false;
|
|
8188
8218
|
}
|
|
8189
|
-
} else if (
|
|
8219
|
+
} else if (_this16.swipeDirection === 'vertical') {
|
|
8190
8220
|
distance = Math.abs(endCoords.pageY - startCoords.pageY);
|
|
8191
8221
|
|
|
8192
|
-
if (
|
|
8193
|
-
|
|
8222
|
+
if (_this16.settings.closable && _this16.settings.swipeToClose && distance > 100) {
|
|
8223
|
+
_this16.closeGallery();
|
|
8194
8224
|
|
|
8195
8225
|
return;
|
|
8196
8226
|
} else {
|
|
8197
|
-
|
|
8227
|
+
_this16.$backdrop.css('opacity', 1);
|
|
8198
8228
|
}
|
|
8199
8229
|
}
|
|
8200
8230
|
|
|
8201
|
-
|
|
8231
|
+
_this16.outer.find('.lg-item').removeAttr('style');
|
|
8202
8232
|
|
|
8203
8233
|
if (triggerClick && Math.abs(endCoords.pageX - startCoords.pageX) < 5) {
|
|
8204
8234
|
// Trigger click if distance is less than 5 pix
|
|
8205
8235
|
var target = $LG(event.target);
|
|
8206
8236
|
|
|
8207
|
-
if (
|
|
8208
|
-
|
|
8237
|
+
if (_this16.isPosterElement(target)) {
|
|
8238
|
+
_this16.LGel.trigger(lGEvents.posterClick);
|
|
8209
8239
|
}
|
|
8210
8240
|
}
|
|
8211
8241
|
|
|
8212
|
-
|
|
8242
|
+
_this16.swipeDirection = undefined;
|
|
8213
8243
|
}); // remove slide class once drag/swipe is completed if mode is not slide
|
|
8214
8244
|
|
|
8215
8245
|
setTimeout(function () {
|
|
8216
|
-
if (!
|
|
8217
|
-
|
|
8246
|
+
if (!_this16.outer.hasClass('lg-dragging') && _this16.settings.mode !== 'lg-slide') {
|
|
8247
|
+
_this16.outer.removeClass('lg-slide');
|
|
8218
8248
|
}
|
|
8219
8249
|
}, this.settings.speed + 100);
|
|
8220
8250
|
}
|
|
8221
8251
|
}, {
|
|
8222
8252
|
key: "enableSwipe",
|
|
8223
8253
|
value: function enableSwipe() {
|
|
8224
|
-
var
|
|
8254
|
+
var _this17 = this;
|
|
8225
8255
|
|
|
8226
8256
|
var startCoords = {};
|
|
8227
8257
|
var endCoords = {};
|
|
@@ -8230,15 +8260,15 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8230
8260
|
|
|
8231
8261
|
if (this.settings.enableSwipe) {
|
|
8232
8262
|
this.$inner.on('touchstart.lg', function (e) {
|
|
8233
|
-
|
|
8263
|
+
_this17.dragOrSwipeEnabled = true;
|
|
8234
8264
|
|
|
8235
|
-
var $item =
|
|
8265
|
+
var $item = _this17.getSlideItem(_this17.index);
|
|
8236
8266
|
|
|
8237
|
-
if (($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) && !
|
|
8267
|
+
if (($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) && !_this17.outer.hasClass('lg-zoomed') && !_this17.lgBusy && e.targetTouches.length === 1) {
|
|
8238
8268
|
isSwiping = true;
|
|
8239
|
-
|
|
8269
|
+
_this17.touchAction = 'swipe';
|
|
8240
8270
|
|
|
8241
|
-
|
|
8271
|
+
_this17.manageSwipeClass();
|
|
8242
8272
|
|
|
8243
8273
|
startCoords = {
|
|
8244
8274
|
pageX: e.targetTouches[0].pageX,
|
|
@@ -8247,32 +8277,32 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8247
8277
|
}
|
|
8248
8278
|
});
|
|
8249
8279
|
this.$inner.on('touchmove.lg', function (e) {
|
|
8250
|
-
if (isSwiping &&
|
|
8280
|
+
if (isSwiping && _this17.touchAction === 'swipe' && e.targetTouches.length === 1) {
|
|
8251
8281
|
endCoords = {
|
|
8252
8282
|
pageX: e.targetTouches[0].pageX,
|
|
8253
8283
|
pageY: e.targetTouches[0].pageY
|
|
8254
8284
|
};
|
|
8255
8285
|
|
|
8256
|
-
|
|
8286
|
+
_this17.touchMove(startCoords, endCoords, e);
|
|
8257
8287
|
|
|
8258
8288
|
isMoved = true;
|
|
8259
8289
|
}
|
|
8260
8290
|
});
|
|
8261
8291
|
this.$inner.on('touchend.lg', function (event) {
|
|
8262
|
-
if (
|
|
8292
|
+
if (_this17.touchAction === 'swipe') {
|
|
8263
8293
|
if (isMoved) {
|
|
8264
8294
|
isMoved = false;
|
|
8265
8295
|
|
|
8266
|
-
|
|
8296
|
+
_this17.touchEnd(endCoords, startCoords, event);
|
|
8267
8297
|
} else if (isSwiping) {
|
|
8268
8298
|
var target = $LG(event.target);
|
|
8269
8299
|
|
|
8270
|
-
if (
|
|
8271
|
-
|
|
8300
|
+
if (_this17.isPosterElement(target)) {
|
|
8301
|
+
_this17.LGel.trigger(lGEvents.posterClick);
|
|
8272
8302
|
}
|
|
8273
8303
|
}
|
|
8274
8304
|
|
|
8275
|
-
|
|
8305
|
+
_this17.touchAction = undefined;
|
|
8276
8306
|
isSwiping = false;
|
|
8277
8307
|
}
|
|
8278
8308
|
});
|
|
@@ -8281,7 +8311,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8281
8311
|
}, {
|
|
8282
8312
|
key: "enableDrag",
|
|
8283
8313
|
value: function enableDrag() {
|
|
8284
|
-
var
|
|
8314
|
+
var _this18 = this;
|
|
8285
8315
|
|
|
8286
8316
|
var startCoords = {};
|
|
8287
8317
|
var endCoords = {};
|
|
@@ -8290,16 +8320,16 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8290
8320
|
|
|
8291
8321
|
if (this.settings.enableDrag) {
|
|
8292
8322
|
this.outer.on('mousedown.lg', function (e) {
|
|
8293
|
-
|
|
8323
|
+
_this18.dragOrSwipeEnabled = true;
|
|
8294
8324
|
|
|
8295
|
-
var $item =
|
|
8325
|
+
var $item = _this18.getSlideItem(_this18.index);
|
|
8296
8326
|
|
|
8297
8327
|
if ($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) {
|
|
8298
|
-
if (!
|
|
8328
|
+
if (!_this18.outer.hasClass('lg-zoomed') && !_this18.lgBusy) {
|
|
8299
8329
|
e.preventDefault();
|
|
8300
8330
|
|
|
8301
|
-
if (!
|
|
8302
|
-
|
|
8331
|
+
if (!_this18.lgBusy) {
|
|
8332
|
+
_this18.manageSwipeClass();
|
|
8303
8333
|
|
|
8304
8334
|
startCoords = {
|
|
8305
8335
|
pageX: e.pageX,
|
|
@@ -8307,31 +8337,31 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8307
8337
|
};
|
|
8308
8338
|
isDraging = true; // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
|
8309
8339
|
|
|
8310
|
-
|
|
8311
|
-
|
|
8340
|
+
_this18.outer.get().scrollLeft += 1;
|
|
8341
|
+
_this18.outer.get().scrollLeft -= 1; // *
|
|
8312
8342
|
|
|
8313
|
-
|
|
8343
|
+
_this18.outer.removeClass('lg-grab').addClass('lg-grabbing');
|
|
8314
8344
|
|
|
8315
|
-
|
|
8345
|
+
_this18.LGel.trigger(lGEvents.dragStart);
|
|
8316
8346
|
}
|
|
8317
8347
|
}
|
|
8318
8348
|
}
|
|
8319
8349
|
});
|
|
8320
8350
|
$LG(window).on("mousemove.lg.global".concat(this.lgId), function (e) {
|
|
8321
|
-
if (isDraging &&
|
|
8351
|
+
if (isDraging && _this18.lgOpened) {
|
|
8322
8352
|
isMoved = true;
|
|
8323
8353
|
endCoords = {
|
|
8324
8354
|
pageX: e.pageX,
|
|
8325
8355
|
pageY: e.pageY
|
|
8326
8356
|
};
|
|
8327
8357
|
|
|
8328
|
-
|
|
8358
|
+
_this18.touchMove(startCoords, endCoords);
|
|
8329
8359
|
|
|
8330
|
-
|
|
8360
|
+
_this18.LGel.trigger(lGEvents.dragMove);
|
|
8331
8361
|
}
|
|
8332
8362
|
});
|
|
8333
8363
|
$LG(window).on("mouseup.lg.global".concat(this.lgId), function (event) {
|
|
8334
|
-
if (!
|
|
8364
|
+
if (!_this18.lgOpened) {
|
|
8335
8365
|
return;
|
|
8336
8366
|
}
|
|
8337
8367
|
|
|
@@ -8340,18 +8370,18 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8340
8370
|
if (isMoved) {
|
|
8341
8371
|
isMoved = false;
|
|
8342
8372
|
|
|
8343
|
-
|
|
8373
|
+
_this18.touchEnd(endCoords, startCoords, event);
|
|
8344
8374
|
|
|
8345
|
-
|
|
8346
|
-
} else if (
|
|
8347
|
-
|
|
8375
|
+
_this18.LGel.trigger(lGEvents.dragEnd);
|
|
8376
|
+
} else if (_this18.isPosterElement(target)) {
|
|
8377
|
+
_this18.LGel.trigger(lGEvents.posterClick);
|
|
8348
8378
|
} // Prevent execution on click
|
|
8349
8379
|
|
|
8350
8380
|
|
|
8351
8381
|
if (isDraging) {
|
|
8352
8382
|
isDraging = false;
|
|
8353
8383
|
|
|
8354
|
-
|
|
8384
|
+
_this18.outer.removeClass('lg-grabbing').addClass('lg-grab');
|
|
8355
8385
|
}
|
|
8356
8386
|
});
|
|
8357
8387
|
}
|
|
@@ -8359,11 +8389,11 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8359
8389
|
}, {
|
|
8360
8390
|
key: "triggerPosterClick",
|
|
8361
8391
|
value: function triggerPosterClick() {
|
|
8362
|
-
var
|
|
8392
|
+
var _this19 = this;
|
|
8363
8393
|
|
|
8364
8394
|
this.$inner.on('click.lg', function (event) {
|
|
8365
|
-
if (!
|
|
8366
|
-
|
|
8395
|
+
if (!_this19.dragOrSwipeEnabled && _this19.isPosterElement($LG(event.target))) {
|
|
8396
|
+
_this19.LGel.trigger(lGEvents.posterClick);
|
|
8367
8397
|
}
|
|
8368
8398
|
});
|
|
8369
8399
|
}
|
|
@@ -8403,7 +8433,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8403
8433
|
}, {
|
|
8404
8434
|
key: "goToNextSlide",
|
|
8405
8435
|
value: function goToNextSlide(fromTouch) {
|
|
8406
|
-
var
|
|
8436
|
+
var _this20 = this;
|
|
8407
8437
|
|
|
8408
8438
|
var _loop = this.settings.loop;
|
|
8409
8439
|
|
|
@@ -8428,7 +8458,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8428
8458
|
} else if (this.settings.slideEndAnimation && !fromTouch) {
|
|
8429
8459
|
this.outer.addClass('lg-right-end');
|
|
8430
8460
|
setTimeout(function () {
|
|
8431
|
-
|
|
8461
|
+
_this20.outer.removeClass('lg-right-end');
|
|
8432
8462
|
}, 400);
|
|
8433
8463
|
}
|
|
8434
8464
|
}
|
|
@@ -8448,7 +8478,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8448
8478
|
}, {
|
|
8449
8479
|
key: "goToPrevSlide",
|
|
8450
8480
|
value: function goToPrevSlide(fromTouch) {
|
|
8451
|
-
var
|
|
8481
|
+
var _this21 = this;
|
|
8452
8482
|
|
|
8453
8483
|
var _loop = this.settings.loop;
|
|
8454
8484
|
|
|
@@ -8475,7 +8505,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8475
8505
|
} else if (this.settings.slideEndAnimation && !fromTouch) {
|
|
8476
8506
|
this.outer.addClass('lg-left-end');
|
|
8477
8507
|
setTimeout(function () {
|
|
8478
|
-
|
|
8508
|
+
_this21.outer.removeClass('lg-left-end');
|
|
8479
8509
|
}, 400);
|
|
8480
8510
|
}
|
|
8481
8511
|
}
|
|
@@ -8484,30 +8514,30 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8484
8514
|
}, {
|
|
8485
8515
|
key: "keyPress",
|
|
8486
8516
|
value: function keyPress() {
|
|
8487
|
-
var
|
|
8517
|
+
var _this22 = this;
|
|
8488
8518
|
|
|
8489
8519
|
$LG(window).on("keydown.lg.global".concat(this.lgId), function (e) {
|
|
8490
|
-
if (
|
|
8520
|
+
if (_this22.lgOpened && _this22.settings.escKey === true && e.keyCode === 27) {
|
|
8491
8521
|
e.preventDefault();
|
|
8492
8522
|
|
|
8493
|
-
if (
|
|
8494
|
-
|
|
8523
|
+
if (_this22.settings.allowMediaOverlap && _this22.outer.hasClass('lg-can-toggle') && _this22.outer.hasClass('lg-components-open')) {
|
|
8524
|
+
_this22.outer.removeClass('lg-components-open');
|
|
8495
8525
|
} else {
|
|
8496
|
-
|
|
8526
|
+
_this22.closeGallery();
|
|
8497
8527
|
}
|
|
8498
8528
|
}
|
|
8499
8529
|
|
|
8500
|
-
if (
|
|
8530
|
+
if (_this22.lgOpened && _this22.galleryItems.length > 1) {
|
|
8501
8531
|
if (e.keyCode === 37) {
|
|
8502
8532
|
e.preventDefault();
|
|
8503
8533
|
|
|
8504
|
-
|
|
8534
|
+
_this22.goToPrevSlide();
|
|
8505
8535
|
}
|
|
8506
8536
|
|
|
8507
8537
|
if (e.keyCode === 39) {
|
|
8508
8538
|
e.preventDefault();
|
|
8509
8539
|
|
|
8510
|
-
|
|
8540
|
+
_this22.goToNextSlide();
|
|
8511
8541
|
}
|
|
8512
8542
|
}
|
|
8513
8543
|
});
|
|
@@ -8515,13 +8545,13 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8515
8545
|
}, {
|
|
8516
8546
|
key: "arrow",
|
|
8517
8547
|
value: function arrow() {
|
|
8518
|
-
var
|
|
8548
|
+
var _this23 = this;
|
|
8519
8549
|
|
|
8520
8550
|
this.getElementById('lg-prev').on('click.lg', function () {
|
|
8521
|
-
|
|
8551
|
+
_this23.goToPrevSlide();
|
|
8522
8552
|
});
|
|
8523
8553
|
this.getElementById('lg-next').on('click.lg', function () {
|
|
8524
|
-
|
|
8554
|
+
_this23.goToNextSlide();
|
|
8525
8555
|
});
|
|
8526
8556
|
}
|
|
8527
8557
|
}, {
|
|
@@ -8555,20 +8585,28 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8555
8585
|
}, {
|
|
8556
8586
|
key: "mousewheel",
|
|
8557
8587
|
value: function mousewheel() {
|
|
8558
|
-
var
|
|
8588
|
+
var _this24 = this;
|
|
8559
8589
|
|
|
8560
|
-
|
|
8561
|
-
|
|
8590
|
+
var lastCall = 0;
|
|
8591
|
+
this.outer.on('wheel.lg', function (e) {
|
|
8592
|
+
if (!e.deltaY || _this24.galleryItems.length < 2) {
|
|
8562
8593
|
return;
|
|
8563
8594
|
}
|
|
8564
8595
|
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8596
|
+
e.preventDefault();
|
|
8597
|
+
var now = new Date().getTime();
|
|
8598
|
+
|
|
8599
|
+
if (now - lastCall < 1000) {
|
|
8600
|
+
return;
|
|
8569
8601
|
}
|
|
8570
8602
|
|
|
8571
|
-
|
|
8603
|
+
lastCall = now;
|
|
8604
|
+
|
|
8605
|
+
if (e.deltaY > 0) {
|
|
8606
|
+
_this24.goToNextSlide();
|
|
8607
|
+
} else if (e.deltaY < 0) {
|
|
8608
|
+
_this24.goToPrevSlide();
|
|
8609
|
+
}
|
|
8572
8610
|
});
|
|
8573
8611
|
}
|
|
8574
8612
|
}, {
|
|
@@ -8590,12 +8628,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8590
8628
|
}, {
|
|
8591
8629
|
key: "toggleMaximize",
|
|
8592
8630
|
value: function toggleMaximize() {
|
|
8593
|
-
var
|
|
8631
|
+
var _this25 = this;
|
|
8594
8632
|
|
|
8595
8633
|
this.getElementById('lg-maximize').on('click.lg', function () {
|
|
8596
|
-
|
|
8634
|
+
_this25.$container.toggleClass('lg-inline');
|
|
8597
8635
|
|
|
8598
|
-
|
|
8636
|
+
_this25.refreshOnResize();
|
|
8599
8637
|
});
|
|
8600
8638
|
}
|
|
8601
8639
|
}, {
|
|
@@ -8610,12 +8648,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8610
8648
|
}, {
|
|
8611
8649
|
key: "manageCloseGallery",
|
|
8612
8650
|
value: function manageCloseGallery() {
|
|
8613
|
-
var
|
|
8651
|
+
var _this26 = this;
|
|
8614
8652
|
|
|
8615
8653
|
if (!this.settings.closable) return;
|
|
8616
8654
|
var mousedown = false;
|
|
8617
8655
|
this.getElementById('lg-close').on('click.lg', function () {
|
|
8618
|
-
|
|
8656
|
+
_this26.closeGallery();
|
|
8619
8657
|
});
|
|
8620
8658
|
|
|
8621
8659
|
if (this.settings.closeOnTap) {
|
|
@@ -8624,7 +8662,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8624
8662
|
this.outer.on('mousedown.lg', function (e) {
|
|
8625
8663
|
var target = $LG(e.target);
|
|
8626
8664
|
|
|
8627
|
-
if (
|
|
8665
|
+
if (_this26.isSlideElement(target)) {
|
|
8628
8666
|
mousedown = true;
|
|
8629
8667
|
} else {
|
|
8630
8668
|
mousedown = false;
|
|
@@ -8636,9 +8674,9 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8636
8674
|
this.outer.on('mouseup.lg', function (e) {
|
|
8637
8675
|
var target = $LG(e.target);
|
|
8638
8676
|
|
|
8639
|
-
if (
|
|
8640
|
-
if (!
|
|
8641
|
-
|
|
8677
|
+
if (_this26.isSlideElement(target) && mousedown) {
|
|
8678
|
+
if (!_this26.outer.hasClass('lg-dragging')) {
|
|
8679
|
+
_this26.closeGallery();
|
|
8642
8680
|
}
|
|
8643
8681
|
}
|
|
8644
8682
|
});
|
|
@@ -8659,7 +8697,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8659
8697
|
}, {
|
|
8660
8698
|
key: "closeGallery",
|
|
8661
8699
|
value: function closeGallery(force) {
|
|
8662
|
-
var
|
|
8700
|
+
var _this27 = this;
|
|
8663
8701
|
|
|
8664
8702
|
if (!this.lgOpened || !this.settings.closable && !force) {
|
|
8665
8703
|
return 0;
|
|
@@ -8708,32 +8746,32 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8708
8746
|
this.$container.removeClass('lg-show-in'); // Once the closign animation is completed and gallery is invisible
|
|
8709
8747
|
|
|
8710
8748
|
setTimeout(function () {
|
|
8711
|
-
if (
|
|
8712
|
-
|
|
8749
|
+
if (_this27.zoomFromOrigin && transform) {
|
|
8750
|
+
_this27.outer.removeClass('lg-zoom-from-image');
|
|
8713
8751
|
}
|
|
8714
8752
|
|
|
8715
|
-
|
|
8753
|
+
_this27.$container.removeClass('lg-show'); // Need to remove inline opacity as it is used in the stylesheet as well
|
|
8716
8754
|
|
|
8717
8755
|
|
|
8718
|
-
|
|
8756
|
+
_this27.$backdrop.removeAttr('style').css('transition-duration', _this27.settings.backdropDuration + 'ms');
|
|
8719
8757
|
|
|
8720
|
-
|
|
8758
|
+
_this27.outer.removeClass("lg-closing ".concat(_this27.settings.startClass));
|
|
8721
8759
|
|
|
8722
|
-
|
|
8760
|
+
_this27.getSlideItem(_this27.index).removeClass('lg-start-end-progress');
|
|
8723
8761
|
|
|
8724
|
-
|
|
8762
|
+
_this27.$inner.empty();
|
|
8725
8763
|
|
|
8726
|
-
if (
|
|
8727
|
-
|
|
8728
|
-
instance:
|
|
8764
|
+
if (_this27.lgOpened) {
|
|
8765
|
+
_this27.LGel.trigger(lGEvents.afterClose, {
|
|
8766
|
+
instance: _this27
|
|
8729
8767
|
});
|
|
8730
8768
|
}
|
|
8731
8769
|
|
|
8732
|
-
if (
|
|
8733
|
-
|
|
8770
|
+
if (_this27.outer.get()) {
|
|
8771
|
+
_this27.outer.get().blur();
|
|
8734
8772
|
}
|
|
8735
8773
|
|
|
8736
|
-
|
|
8774
|
+
_this27.lgOpened = false;
|
|
8737
8775
|
}, removeTimeout + 100);
|
|
8738
8776
|
return removeTimeout + 100;
|
|
8739
8777
|
}
|
|
@@ -8819,21 +8857,21 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8819
8857
|
}, {
|
|
8820
8858
|
key: "destroy",
|
|
8821
8859
|
value: function destroy() {
|
|
8822
|
-
var
|
|
8860
|
+
var _this28 = this;
|
|
8823
8861
|
|
|
8824
8862
|
var closeTimeout = this.closeGallery(true);
|
|
8825
8863
|
setTimeout(function () {
|
|
8826
|
-
|
|
8864
|
+
_this28.destroyModules(true);
|
|
8827
8865
|
|
|
8828
|
-
if (!
|
|
8829
|
-
|
|
8866
|
+
if (!_this28.settings.dynamic) {
|
|
8867
|
+
_this28.invalidateItems();
|
|
8830
8868
|
}
|
|
8831
8869
|
|
|
8832
|
-
$LG(window).off(".lg.global".concat(
|
|
8870
|
+
$LG(window).off(".lg.global".concat(_this28.lgId));
|
|
8833
8871
|
|
|
8834
|
-
|
|
8872
|
+
_this28.LGel.off('.lg');
|
|
8835
8873
|
|
|
8836
|
-
|
|
8874
|
+
_this28.$container.remove();
|
|
8837
8875
|
}, closeTimeout);
|
|
8838
8876
|
return closeTimeout;
|
|
8839
8877
|
}
|
|
@@ -8973,6 +9011,18 @@ LightGalleryvue_type_script_lang_ts_Lightgallery = __decorate([Options({
|
|
|
8973
9011
|
},
|
|
8974
9012
|
onAfterClose: {
|
|
8975
9013
|
type: Function
|
|
9014
|
+
},
|
|
9015
|
+
onRotateLeft: {
|
|
9016
|
+
type: Function
|
|
9017
|
+
},
|
|
9018
|
+
onRotateRight: {
|
|
9019
|
+
type: Function
|
|
9020
|
+
},
|
|
9021
|
+
onFlipHorizontal: {
|
|
9022
|
+
type: Function
|
|
9023
|
+
},
|
|
9024
|
+
onFlipVertical: {
|
|
9025
|
+
type: Function
|
|
8976
9026
|
}
|
|
8977
9027
|
}
|
|
8978
9028
|
})], LightGalleryvue_type_script_lang_ts_Lightgallery);
|