lightgallery 2.3.0-beta.2 → 2.4.0-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/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 +19 -27
- package/css/lightgallery-bundle.min.css +1 -1
- package/css/lightgallery-core.css +0 -20
- package/css/lightgallery.css +19 -27
- package/lg-events.d.ts +44 -0
- package/lg-settings.d.ts +20 -8
- 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 -2
- 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 +31 -20
- package/lib/lgQuery.js.map +1 -1
- package/lib/lightgallery.js +30 -19
- package/lib/lightgallery.js.map +1 -1
- package/lib/plugins/autoplay/lg-autoplay-settings.js +1 -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 +1 -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 +1 -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 +1 -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 +174 -139
- package/lightgallery.es5.js.map +1 -1
- package/lightgallery.min.js +2 -2
- package/lightgallery.umd.js +174 -139
- 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 +6 -0
- package/plugins/autoplay/lg-autoplay.d.ts +2 -2
- package/plugins/autoplay/lg-autoplay.es5.js +25 -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 +25 -12
- package/plugins/autoplay/lg-autoplay.umd.js.map +1 -1
- package/plugins/comment/lg-comment-settings.d.ts +6 -0
- package/plugins/comment/lg-comment.es5.js +6 -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 +6 -2
- package/plugins/comment/lg-comment.umd.js.map +1 -1
- package/plugins/fullscreen/lg-fullscreen-settings.d.ts +6 -0
- package/plugins/fullscreen/lg-fullscreen.es5.js +3 -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 +3 -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 +12 -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 +9 -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 +6 -0
- package/plugins/thumbnail/lg-thumbnail.es5.js +8 -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 +8 -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 +6 -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 +203 -140
- package/react/Lightgallery.es5.js.map +1 -1
- package/react/Lightgallery.umd.js +203 -140
- package/react/Lightgallery.umd.js.map +1 -1
- package/scss/_lg-theme-default.scss +17 -10
- package/scss/lightgallery-core.scss +0 -25
- package/vue/LightGallery.vue.d.ts +5 -1
- package/vue/LightGalleryVue.common.js +317 -270
- package/vue/LightGalleryVue.common.js.map +1 -1
- package/vue/LightGalleryVue.umd.js +317 -270
- 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) {
|
|
@@ -6108,7 +6220,9 @@ var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
|
6108
6220
|
this._each(function (el) {
|
|
6109
6221
|
// IE doesn't support multiple arguments
|
|
6110
6222
|
classNames.split(' ').forEach(function (className) {
|
|
6111
|
-
|
|
6223
|
+
if (className) {
|
|
6224
|
+
el.classList.add(className);
|
|
6225
|
+
}
|
|
6112
6226
|
});
|
|
6113
6227
|
});
|
|
6114
6228
|
|
|
@@ -6120,7 +6234,9 @@ var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
|
6120
6234
|
this._each(function (el) {
|
|
6121
6235
|
// IE doesn't support multiple arguments
|
|
6122
6236
|
classNames.split(' ').forEach(function (className) {
|
|
6123
|
-
|
|
6237
|
+
if (className) {
|
|
6238
|
+
el.classList.remove(className);
|
|
6239
|
+
}
|
|
6124
6240
|
});
|
|
6125
6241
|
});
|
|
6126
6242
|
|
|
@@ -6382,6 +6498,7 @@ var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
|
6382
6498
|
}();
|
|
6383
6499
|
lgQuery_lgQuery.eventListeners = {};
|
|
6384
6500
|
function $LG(selector) {
|
|
6501
|
+
initLgPolyfills();
|
|
6385
6502
|
return new lgQuery_lgQuery(selector);
|
|
6386
6503
|
}
|
|
6387
6504
|
// CONCATENATED MODULE: ../src/lg-utils.ts
|
|
@@ -6493,9 +6610,9 @@ var utils = {
|
|
|
6493
6610
|
var transform = 'translate3d(' + (x *= -1) + 'px, ' + (y *= -1) + 'px, 0) scale3d(' + scX + ', ' + scY + ', 1)';
|
|
6494
6611
|
return transform;
|
|
6495
6612
|
},
|
|
6496
|
-
getIframeMarkup: function getIframeMarkup(iframeWidth, iframeHeight, src, iframeTitle) {
|
|
6613
|
+
getIframeMarkup: function getIframeMarkup(iframeWidth, iframeHeight, iframeMaxWidth, iframeMaxHeight, src, iframeTitle) {
|
|
6497
6614
|
var title = iframeTitle ? 'title="' + iframeTitle + '"' : '';
|
|
6498
|
-
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>");
|
|
6615
|
+
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>");
|
|
6499
6616
|
},
|
|
6500
6617
|
getImgMarkup: function getImgMarkup(index, src, altAttr, srcset, sizes, sources) {
|
|
6501
6618
|
var srcsetAttr = srcset ? "srcset=\"".concat(srcset, "\"") : '';
|
|
@@ -6565,7 +6682,7 @@ var utils = {
|
|
|
6565
6682
|
|
|
6566
6683
|
return true;
|
|
6567
6684
|
},
|
|
6568
|
-
getVideoPosterMarkup: function getVideoPosterMarkup(_poster, dummyImg, videoContStyle, _isVideo) {
|
|
6685
|
+
getVideoPosterMarkup: function getVideoPosterMarkup(_poster, dummyImg, videoContStyle, playVideoString, _isVideo) {
|
|
6569
6686
|
var videoClass = '';
|
|
6570
6687
|
|
|
6571
6688
|
if (_isVideo && _isVideo.youtube) {
|
|
@@ -6576,7 +6693,7 @@ var utils = {
|
|
|
6576
6693
|
videoClass = 'lg-has-html5';
|
|
6577
6694
|
}
|
|
6578
6695
|
|
|
6579
|
-
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=\"
|
|
6696
|
+
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>");
|
|
6580
6697
|
},
|
|
6581
6698
|
|
|
6582
6699
|
/**
|
|
@@ -6668,103 +6785,6 @@ var utils = {
|
|
|
6668
6785
|
}
|
|
6669
6786
|
};
|
|
6670
6787
|
/* harmony default export */ var lg_utils = (utils);
|
|
6671
|
-
// CONCATENATED MODULE: ../src/lg-settings.ts
|
|
6672
|
-
var lightGalleryCoreSettings = {
|
|
6673
|
-
mode: 'lg-slide',
|
|
6674
|
-
easing: 'ease',
|
|
6675
|
-
speed: 400,
|
|
6676
|
-
licenseKey: '0000-0000-000-0000',
|
|
6677
|
-
height: '100%',
|
|
6678
|
-
width: '100%',
|
|
6679
|
-
addClass: '',
|
|
6680
|
-
startClass: 'lg-start-zoom',
|
|
6681
|
-
backdropDuration: 300,
|
|
6682
|
-
container: document.body,
|
|
6683
|
-
startAnimationDuration: 400,
|
|
6684
|
-
zoomFromOrigin: true,
|
|
6685
|
-
hideBarsDelay: 0,
|
|
6686
|
-
showBarsAfter: 10000,
|
|
6687
|
-
slideDelay: 0,
|
|
6688
|
-
supportLegacyBrowser: true,
|
|
6689
|
-
allowMediaOverlap: false,
|
|
6690
|
-
videoMaxSize: '1280-720',
|
|
6691
|
-
defaultCaptionHeight: 0,
|
|
6692
|
-
ariaLabelledby: '',
|
|
6693
|
-
ariaDescribedby: '',
|
|
6694
|
-
closable: true,
|
|
6695
|
-
swipeToClose: true,
|
|
6696
|
-
closeOnTap: true,
|
|
6697
|
-
showCloseIcon: true,
|
|
6698
|
-
showMaximizeIcon: false,
|
|
6699
|
-
loop: true,
|
|
6700
|
-
escKey: true,
|
|
6701
|
-
keyPress: true,
|
|
6702
|
-
controls: true,
|
|
6703
|
-
slideEndAnimation: true,
|
|
6704
|
-
hideControlOnEnd: false,
|
|
6705
|
-
mousewheel: false,
|
|
6706
|
-
getCaptionFromTitleOrAlt: true,
|
|
6707
|
-
appendSubHtmlTo: '.lg-sub-html',
|
|
6708
|
-
subHtmlSelectorRelative: false,
|
|
6709
|
-
preload: 2,
|
|
6710
|
-
numberOfSlideItemsInDom: 10,
|
|
6711
|
-
showAfterLoad: true,
|
|
6712
|
-
selector: '',
|
|
6713
|
-
selectWithin: '',
|
|
6714
|
-
nextHtml: '',
|
|
6715
|
-
prevHtml: '',
|
|
6716
|
-
index: 0,
|
|
6717
|
-
iframeWidth: '100%',
|
|
6718
|
-
iframeHeight: '100%',
|
|
6719
|
-
download: true,
|
|
6720
|
-
counter: true,
|
|
6721
|
-
appendCounterTo: '.lg-toolbar',
|
|
6722
|
-
swipeThreshold: 50,
|
|
6723
|
-
enableSwipe: true,
|
|
6724
|
-
enableDrag: true,
|
|
6725
|
-
dynamic: false,
|
|
6726
|
-
dynamicEl: [],
|
|
6727
|
-
extraProps: [],
|
|
6728
|
-
exThumbImage: '',
|
|
6729
|
-
isMobile: undefined,
|
|
6730
|
-
mobileSettings: {
|
|
6731
|
-
controls: false,
|
|
6732
|
-
showCloseIcon: false,
|
|
6733
|
-
download: false
|
|
6734
|
-
},
|
|
6735
|
-
plugins: []
|
|
6736
|
-
};
|
|
6737
|
-
// CONCATENATED MODULE: ../src/lg-events.ts
|
|
6738
|
-
/**
|
|
6739
|
-
* List of lightGallery events
|
|
6740
|
-
* All events should be documented here
|
|
6741
|
-
* Below interfaces are used to build the website documentations
|
|
6742
|
-
* */
|
|
6743
|
-
var lGEvents = {
|
|
6744
|
-
afterAppendSlide: 'lgAfterAppendSlide',
|
|
6745
|
-
init: 'lgInit',
|
|
6746
|
-
hasVideo: 'lgHasVideo',
|
|
6747
|
-
containerResize: 'lgContainerResize',
|
|
6748
|
-
updateSlides: 'lgUpdateSlides',
|
|
6749
|
-
afterAppendSubHtml: 'lgAfterAppendSubHtml',
|
|
6750
|
-
beforeOpen: 'lgBeforeOpen',
|
|
6751
|
-
afterOpen: 'lgAfterOpen',
|
|
6752
|
-
slideItemLoad: 'lgSlideItemLoad',
|
|
6753
|
-
beforeSlide: 'lgBeforeSlide',
|
|
6754
|
-
afterSlide: 'lgAfterSlide',
|
|
6755
|
-
posterClick: 'lgPosterClick',
|
|
6756
|
-
dragStart: 'lgDragStart',
|
|
6757
|
-
dragMove: 'lgDragMove',
|
|
6758
|
-
dragEnd: 'lgDragEnd',
|
|
6759
|
-
beforeNextSlide: 'lgBeforeNextSlide',
|
|
6760
|
-
beforePrevSlide: 'lgBeforePrevSlide',
|
|
6761
|
-
beforeClose: 'lgBeforeClose',
|
|
6762
|
-
afterClose: 'lgAfterClose',
|
|
6763
|
-
rotateLeft: 'lgRotateLeft',
|
|
6764
|
-
rotateRight: 'lgRotateRight',
|
|
6765
|
-
flipHorizontal: 'lgFlipHorizontal',
|
|
6766
|
-
flipVertical: 'lgFlipVertical'
|
|
6767
|
-
};
|
|
6768
6788
|
// CONCATENATED MODULE: ../src/lightgallery.ts
|
|
6769
6789
|
|
|
6770
6790
|
|
|
@@ -6990,7 +7010,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
6990
7010
|
var subHtmlCont = ''; // Create controls
|
|
6991
7011
|
|
|
6992
7012
|
if (this.settings.controls) {
|
|
6993
|
-
controls = "<button type=\"button\" id=\"".concat(this.getIdName('lg-prev'), "\" aria-label=\"
|
|
7013
|
+
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>");
|
|
6994
7014
|
}
|
|
6995
7015
|
|
|
6996
7016
|
if (this.settings.appendSubHtmlTo !== '.lg-item') {
|
|
@@ -7007,10 +7027,15 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7007
7027
|
var ariaLabelledby = this.settings.ariaLabelledby ? 'aria-labelledby="' + this.settings.ariaLabelledby + '"' : '';
|
|
7008
7028
|
var ariaDescribedby = this.settings.ariaDescribedby ? 'aria-describedby="' + this.settings.ariaDescribedby + '"' : '';
|
|
7009
7029
|
var containerClassName = "lg-container ".concat(this.settings.addClass, " ").concat(document.body !== this.settings.container ? 'lg-inline' : '');
|
|
7010
|
-
var closeIcon = this.settings.closable && this.settings.showCloseIcon ? "<button type=\"button\" aria-label=\"
|
|
7011
|
-
var maximizeIcon = this.settings.showMaximizeIcon ? "<button type=\"button\" aria-label=\"
|
|
7030
|
+
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>") : '';
|
|
7031
|
+
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>") : '';
|
|
7012
7032
|
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 ");
|
|
7013
|
-
$LG(this.settings.container).
|
|
7033
|
+
$LG(this.settings.container).append(template);
|
|
7034
|
+
|
|
7035
|
+
if (document.body !== this.settings.container) {
|
|
7036
|
+
$LG(this.settings.container).css('position', 'relative');
|
|
7037
|
+
}
|
|
7038
|
+
|
|
7014
7039
|
this.outer = this.getElementById('lg-outer');
|
|
7015
7040
|
this.$lgComponents = this.getElementById('lg-components');
|
|
7016
7041
|
this.$backdrop = this.getElementById('lg-backdrop');
|
|
@@ -7026,16 +7051,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7026
7051
|
outerClassNames += 'lg-grab ';
|
|
7027
7052
|
}
|
|
7028
7053
|
|
|
7029
|
-
if (this.settings.showAfterLoad) {
|
|
7030
|
-
outerClassNames += 'lg-show-after-load';
|
|
7031
|
-
}
|
|
7032
|
-
|
|
7033
7054
|
this.outer.addClass(outerClassNames);
|
|
7034
7055
|
this.$inner.css('transition-timing-function', this.settings.easing);
|
|
7035
7056
|
this.$inner.css('transition-duration', this.settings.speed + 'ms');
|
|
7036
7057
|
|
|
7037
7058
|
if (this.settings.download) {
|
|
7038
|
-
this.$toolbar.append("<a id=\"".concat(this.getIdName('lg-download'), "\" target=\"_blank\" rel=\"noopener\" aria-label=\"
|
|
7059
|
+
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>"));
|
|
7039
7060
|
}
|
|
7040
7061
|
|
|
7041
7062
|
this.counter();
|
|
@@ -7614,8 +7635,14 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7614
7635
|
}, {
|
|
7615
7636
|
key: "addSlideVideoInfo",
|
|
7616
7637
|
value: function addSlideVideoInfo(items) {
|
|
7638
|
+
var _this9 = this;
|
|
7639
|
+
|
|
7617
7640
|
items.forEach(function (element, index) {
|
|
7618
7641
|
element.__slideVideoInfo = lg_utils.isVideo(element.src, !!element.video, index);
|
|
7642
|
+
|
|
7643
|
+
if (element.__slideVideoInfo && _this9.settings.loadYouTubePoster && !element.poster && element.__slideVideoInfo.youtube) {
|
|
7644
|
+
element.poster = "//img.youtube.com/vi/".concat(element.__slideVideoInfo.youtube[1], "/maxresdefault.jpg");
|
|
7645
|
+
}
|
|
7619
7646
|
});
|
|
7620
7647
|
}
|
|
7621
7648
|
/**
|
|
@@ -7628,7 +7655,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7628
7655
|
}, {
|
|
7629
7656
|
key: "loadContent",
|
|
7630
7657
|
value: function loadContent(index, rec) {
|
|
7631
|
-
var
|
|
7658
|
+
var _this10 = this;
|
|
7632
7659
|
|
|
7633
7660
|
var currentGalleryItem = this.galleryItems[index];
|
|
7634
7661
|
var $currentSlide = $LG(this.getSlideItemId(index));
|
|
@@ -7671,7 +7698,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7671
7698
|
}
|
|
7672
7699
|
|
|
7673
7700
|
if (iframe) {
|
|
7674
|
-
var markup = lg_utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, src, currentGalleryItem.iframeTitle);
|
|
7701
|
+
var markup = lg_utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, this.settings.iframeMaxWidth, this.settings.iframeMaxHeight, src, currentGalleryItem.iframeTitle);
|
|
7675
7702
|
$currentSlide.prepend(markup);
|
|
7676
7703
|
} else if (poster) {
|
|
7677
7704
|
var dummyImg = '';
|
|
@@ -7681,7 +7708,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7681
7708
|
dummyImg = this.getDummyImageContent($currentSlide, index, '');
|
|
7682
7709
|
}
|
|
7683
7710
|
|
|
7684
|
-
var _markup = lg_utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, videoInfo);
|
|
7711
|
+
var _markup = lg_utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, this.settings.strings['playVideo'], videoInfo);
|
|
7685
7712
|
|
|
7686
7713
|
$currentSlide.prepend(_markup);
|
|
7687
7714
|
} else if (videoInfo) {
|
|
@@ -7731,24 +7758,24 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7731
7758
|
|
|
7732
7759
|
if (!$currentSlide.hasClass('lg-loaded')) {
|
|
7733
7760
|
setTimeout(function () {
|
|
7734
|
-
if (
|
|
7761
|
+
if (_this10.getSlideType(currentGalleryItem) === 'image') {
|
|
7735
7762
|
$currentSlide.find('.lg-img-wrap').append(lg_utils.getImgMarkup(index, src, '', srcset, sizes, currentGalleryItem.sources));
|
|
7736
7763
|
|
|
7737
7764
|
if (srcset || sources) {
|
|
7738
7765
|
var _$img = $currentSlide.find('.lg-object');
|
|
7739
7766
|
|
|
7740
|
-
|
|
7767
|
+
_this10.initPictureFill(_$img);
|
|
7741
7768
|
}
|
|
7742
7769
|
}
|
|
7743
7770
|
|
|
7744
|
-
if (
|
|
7745
|
-
|
|
7771
|
+
if (_this10.getSlideType(currentGalleryItem) === 'image' || _this10.getSlideType(currentGalleryItem) === 'video' && poster) {
|
|
7772
|
+
_this10.onLgObjectLoad($currentSlide, index, delay, _speed, true, false); // load remaining slides once the slide is completely loaded
|
|
7746
7773
|
|
|
7747
7774
|
|
|
7748
|
-
|
|
7749
|
-
|
|
7775
|
+
_this10.onSlideObjectLoad($currentSlide, !!(videoInfo && videoInfo.html5 && !poster), function () {
|
|
7776
|
+
_this10.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);
|
|
7750
7777
|
}, function () {
|
|
7751
|
-
|
|
7778
|
+
_this10.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);
|
|
7752
7779
|
});
|
|
7753
7780
|
}
|
|
7754
7781
|
}, this.settings.startAnimationDuration + 100);
|
|
@@ -7776,7 +7803,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7776
7803
|
if (rec === true) {
|
|
7777
7804
|
if (!$currentSlide.hasClass('lg-complete_')) {
|
|
7778
7805
|
$currentSlide.find('.lg-object').first().on('load.lg error.lg', function () {
|
|
7779
|
-
|
|
7806
|
+
_this10.preload(index);
|
|
7780
7807
|
});
|
|
7781
7808
|
} else {
|
|
7782
7809
|
this.preload(index);
|
|
@@ -7794,23 +7821,23 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7794
7821
|
}, {
|
|
7795
7822
|
key: "loadContentOnFirstSlideLoad",
|
|
7796
7823
|
value: function loadContentOnFirstSlideLoad(index, $currentSlide, speed) {
|
|
7797
|
-
var
|
|
7824
|
+
var _this11 = this;
|
|
7798
7825
|
|
|
7799
7826
|
setTimeout(function () {
|
|
7800
7827
|
$currentSlide.find('.lg-dummy-img').remove();
|
|
7801
7828
|
$currentSlide.removeClass('lg-first-slide');
|
|
7802
7829
|
|
|
7803
|
-
|
|
7830
|
+
_this11.outer.removeClass('lg-first-slide-loading');
|
|
7804
7831
|
|
|
7805
|
-
|
|
7832
|
+
_this11.isDummyImageRemoved = true;
|
|
7806
7833
|
|
|
7807
|
-
|
|
7834
|
+
_this11.preload(index);
|
|
7808
7835
|
}, speed + 300);
|
|
7809
7836
|
}
|
|
7810
7837
|
}, {
|
|
7811
7838
|
key: "getItemsToBeInsertedToDom",
|
|
7812
7839
|
value: function getItemsToBeInsertedToDom(index, prevIndex) {
|
|
7813
|
-
var
|
|
7840
|
+
var _this12 = this;
|
|
7814
7841
|
|
|
7815
7842
|
var numberOfItems = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
7816
7843
|
var itemsToBeInsertedToDom = []; // Minimum 2 items should be there
|
|
@@ -7821,7 +7848,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7821
7848
|
|
|
7822
7849
|
if (this.galleryItems.length <= 3) {
|
|
7823
7850
|
this.galleryItems.forEach(function (_element, index) {
|
|
7824
|
-
itemsToBeInsertedToDom.push("lg-item-".concat(
|
|
7851
|
+
itemsToBeInsertedToDom.push("lg-item-".concat(_this12.lgId, "-").concat(index));
|
|
7825
7852
|
});
|
|
7826
7853
|
return itemsToBeInsertedToDom;
|
|
7827
7854
|
}
|
|
@@ -7865,12 +7892,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7865
7892
|
}, {
|
|
7866
7893
|
key: "organizeSlideItems",
|
|
7867
7894
|
value: function organizeSlideItems(index, prevIndex) {
|
|
7868
|
-
var
|
|
7895
|
+
var _this13 = this;
|
|
7869
7896
|
|
|
7870
7897
|
var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, prevIndex, this.settings.numberOfSlideItemsInDom);
|
|
7871
7898
|
itemsToBeInsertedToDom.forEach(function (item) {
|
|
7872
|
-
if (
|
|
7873
|
-
|
|
7899
|
+
if (_this13.currentItemsInDom.indexOf(item) === -1) {
|
|
7900
|
+
_this13.$inner.append("<div id=\"".concat(item, "\" class=\"lg-item\"></div>"));
|
|
7874
7901
|
}
|
|
7875
7902
|
});
|
|
7876
7903
|
this.currentItemsInDom.forEach(function (item) {
|
|
@@ -7921,7 +7948,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7921
7948
|
}, {
|
|
7922
7949
|
key: "makeSlideAnimation",
|
|
7923
7950
|
value: function makeSlideAnimation(direction, currentSlideItem, previousSlideItem) {
|
|
7924
|
-
var
|
|
7951
|
+
var _this14 = this;
|
|
7925
7952
|
|
|
7926
7953
|
if (this.lGalleryOn) {
|
|
7927
7954
|
previousSlideItem.addClass('lg-slide-progress');
|
|
@@ -7929,9 +7956,9 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7929
7956
|
|
|
7930
7957
|
setTimeout(function () {
|
|
7931
7958
|
// remove all transitions
|
|
7932
|
-
|
|
7959
|
+
_this14.outer.addClass('lg-no-trans');
|
|
7933
7960
|
|
|
7934
|
-
|
|
7961
|
+
_this14.outer.find('.lg-item').removeClass('lg-prev-slide lg-next-slide');
|
|
7935
7962
|
|
|
7936
7963
|
if (direction === 'prev') {
|
|
7937
7964
|
//prevslide
|
|
@@ -7945,11 +7972,11 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7945
7972
|
|
|
7946
7973
|
|
|
7947
7974
|
setTimeout(function () {
|
|
7948
|
-
|
|
7975
|
+
_this14.outer.find('.lg-item').removeClass('lg-current');
|
|
7949
7976
|
|
|
7950
7977
|
currentSlideItem.addClass('lg-current'); // reset all transitions
|
|
7951
7978
|
|
|
7952
|
-
|
|
7979
|
+
_this14.outer.removeClass('lg-no-trans');
|
|
7953
7980
|
}, 50);
|
|
7954
7981
|
}, this.lGalleryOn ? this.settings.slideDelay : 0);
|
|
7955
7982
|
}
|
|
@@ -7970,7 +7997,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7970
7997
|
}, {
|
|
7971
7998
|
key: "slide",
|
|
7972
7999
|
value: function slide(index, fromTouch, fromThumb, direction) {
|
|
7973
|
-
var
|
|
8000
|
+
var _this15 = this;
|
|
7974
8001
|
|
|
7975
8002
|
var prevIndex = this.getPreviousSlideIndex();
|
|
7976
8003
|
this.currentItemsInDom = this.organizeSlideItems(index, prevIndex); // Prevent multiple call, Required for hsh plugin
|
|
@@ -8058,20 +8085,20 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8058
8085
|
this.loadContent(index, true);
|
|
8059
8086
|
} else {
|
|
8060
8087
|
setTimeout(function () {
|
|
8061
|
-
|
|
8088
|
+
_this15.loadContent(index, true); // Add title if this.settings.appendSubHtmlTo === lg-sub-html
|
|
8062
8089
|
|
|
8063
8090
|
|
|
8064
|
-
if (
|
|
8065
|
-
|
|
8091
|
+
if (_this15.settings.appendSubHtmlTo !== '.lg-item') {
|
|
8092
|
+
_this15.addHtml(index);
|
|
8066
8093
|
}
|
|
8067
8094
|
}, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay));
|
|
8068
8095
|
}
|
|
8069
8096
|
|
|
8070
8097
|
setTimeout(function () {
|
|
8071
|
-
|
|
8098
|
+
_this15.lgBusy = false;
|
|
8072
8099
|
previousSlideItem.removeClass('lg-slide-progress');
|
|
8073
8100
|
|
|
8074
|
-
|
|
8101
|
+
_this15.LGel.trigger(lGEvents.afterSlide, {
|
|
8075
8102
|
prevIndex: prevIndex,
|
|
8076
8103
|
index: index,
|
|
8077
8104
|
fromTouch: fromTouch,
|
|
@@ -8158,7 +8185,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8158
8185
|
}, {
|
|
8159
8186
|
key: "touchEnd",
|
|
8160
8187
|
value: function touchEnd(endCoords, startCoords, event) {
|
|
8161
|
-
var
|
|
8188
|
+
var _this16 = this;
|
|
8162
8189
|
|
|
8163
8190
|
var distance; // keep slide animation for any mode while dragg/swipe
|
|
8164
8191
|
|
|
@@ -8168,61 +8195,61 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8168
8195
|
|
|
8169
8196
|
|
|
8170
8197
|
setTimeout(function () {
|
|
8171
|
-
|
|
8198
|
+
_this16.$container.removeClass('lg-dragging-vertical');
|
|
8172
8199
|
|
|
8173
|
-
|
|
8200
|
+
_this16.outer.removeClass('lg-dragging lg-hide-items').addClass('lg-components-open');
|
|
8174
8201
|
|
|
8175
8202
|
var triggerClick = true;
|
|
8176
8203
|
|
|
8177
|
-
if (
|
|
8204
|
+
if (_this16.swipeDirection === 'horizontal') {
|
|
8178
8205
|
distance = endCoords.pageX - startCoords.pageX;
|
|
8179
8206
|
var distanceAbs = Math.abs(endCoords.pageX - startCoords.pageX);
|
|
8180
8207
|
|
|
8181
|
-
if (distance < 0 && distanceAbs >
|
|
8182
|
-
|
|
8208
|
+
if (distance < 0 && distanceAbs > _this16.settings.swipeThreshold) {
|
|
8209
|
+
_this16.goToNextSlide(true);
|
|
8183
8210
|
|
|
8184
8211
|
triggerClick = false;
|
|
8185
|
-
} else if (distance > 0 && distanceAbs >
|
|
8186
|
-
|
|
8212
|
+
} else if (distance > 0 && distanceAbs > _this16.settings.swipeThreshold) {
|
|
8213
|
+
_this16.goToPrevSlide(true);
|
|
8187
8214
|
|
|
8188
8215
|
triggerClick = false;
|
|
8189
8216
|
}
|
|
8190
|
-
} else if (
|
|
8217
|
+
} else if (_this16.swipeDirection === 'vertical') {
|
|
8191
8218
|
distance = Math.abs(endCoords.pageY - startCoords.pageY);
|
|
8192
8219
|
|
|
8193
|
-
if (
|
|
8194
|
-
|
|
8220
|
+
if (_this16.settings.closable && _this16.settings.swipeToClose && distance > 100) {
|
|
8221
|
+
_this16.closeGallery();
|
|
8195
8222
|
|
|
8196
8223
|
return;
|
|
8197
8224
|
} else {
|
|
8198
|
-
|
|
8225
|
+
_this16.$backdrop.css('opacity', 1);
|
|
8199
8226
|
}
|
|
8200
8227
|
}
|
|
8201
8228
|
|
|
8202
|
-
|
|
8229
|
+
_this16.outer.find('.lg-item').removeAttr('style');
|
|
8203
8230
|
|
|
8204
8231
|
if (triggerClick && Math.abs(endCoords.pageX - startCoords.pageX) < 5) {
|
|
8205
8232
|
// Trigger click if distance is less than 5 pix
|
|
8206
8233
|
var target = $LG(event.target);
|
|
8207
8234
|
|
|
8208
|
-
if (
|
|
8209
|
-
|
|
8235
|
+
if (_this16.isPosterElement(target)) {
|
|
8236
|
+
_this16.LGel.trigger(lGEvents.posterClick);
|
|
8210
8237
|
}
|
|
8211
8238
|
}
|
|
8212
8239
|
|
|
8213
|
-
|
|
8240
|
+
_this16.swipeDirection = undefined;
|
|
8214
8241
|
}); // remove slide class once drag/swipe is completed if mode is not slide
|
|
8215
8242
|
|
|
8216
8243
|
setTimeout(function () {
|
|
8217
|
-
if (!
|
|
8218
|
-
|
|
8244
|
+
if (!_this16.outer.hasClass('lg-dragging') && _this16.settings.mode !== 'lg-slide') {
|
|
8245
|
+
_this16.outer.removeClass('lg-slide');
|
|
8219
8246
|
}
|
|
8220
8247
|
}, this.settings.speed + 100);
|
|
8221
8248
|
}
|
|
8222
8249
|
}, {
|
|
8223
8250
|
key: "enableSwipe",
|
|
8224
8251
|
value: function enableSwipe() {
|
|
8225
|
-
var
|
|
8252
|
+
var _this17 = this;
|
|
8226
8253
|
|
|
8227
8254
|
var startCoords = {};
|
|
8228
8255
|
var endCoords = {};
|
|
@@ -8231,15 +8258,15 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8231
8258
|
|
|
8232
8259
|
if (this.settings.enableSwipe) {
|
|
8233
8260
|
this.$inner.on('touchstart.lg', function (e) {
|
|
8234
|
-
|
|
8261
|
+
_this17.dragOrSwipeEnabled = true;
|
|
8235
8262
|
|
|
8236
|
-
var $item =
|
|
8263
|
+
var $item = _this17.getSlideItem(_this17.index);
|
|
8237
8264
|
|
|
8238
|
-
if (($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) && !
|
|
8265
|
+
if (($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) && !_this17.outer.hasClass('lg-zoomed') && !_this17.lgBusy && e.targetTouches.length === 1) {
|
|
8239
8266
|
isSwiping = true;
|
|
8240
|
-
|
|
8267
|
+
_this17.touchAction = 'swipe';
|
|
8241
8268
|
|
|
8242
|
-
|
|
8269
|
+
_this17.manageSwipeClass();
|
|
8243
8270
|
|
|
8244
8271
|
startCoords = {
|
|
8245
8272
|
pageX: e.targetTouches[0].pageX,
|
|
@@ -8248,32 +8275,32 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8248
8275
|
}
|
|
8249
8276
|
});
|
|
8250
8277
|
this.$inner.on('touchmove.lg', function (e) {
|
|
8251
|
-
if (isSwiping &&
|
|
8278
|
+
if (isSwiping && _this17.touchAction === 'swipe' && e.targetTouches.length === 1) {
|
|
8252
8279
|
endCoords = {
|
|
8253
8280
|
pageX: e.targetTouches[0].pageX,
|
|
8254
8281
|
pageY: e.targetTouches[0].pageY
|
|
8255
8282
|
};
|
|
8256
8283
|
|
|
8257
|
-
|
|
8284
|
+
_this17.touchMove(startCoords, endCoords, e);
|
|
8258
8285
|
|
|
8259
8286
|
isMoved = true;
|
|
8260
8287
|
}
|
|
8261
8288
|
});
|
|
8262
8289
|
this.$inner.on('touchend.lg', function (event) {
|
|
8263
|
-
if (
|
|
8290
|
+
if (_this17.touchAction === 'swipe') {
|
|
8264
8291
|
if (isMoved) {
|
|
8265
8292
|
isMoved = false;
|
|
8266
8293
|
|
|
8267
|
-
|
|
8294
|
+
_this17.touchEnd(endCoords, startCoords, event);
|
|
8268
8295
|
} else if (isSwiping) {
|
|
8269
8296
|
var target = $LG(event.target);
|
|
8270
8297
|
|
|
8271
|
-
if (
|
|
8272
|
-
|
|
8298
|
+
if (_this17.isPosterElement(target)) {
|
|
8299
|
+
_this17.LGel.trigger(lGEvents.posterClick);
|
|
8273
8300
|
}
|
|
8274
8301
|
}
|
|
8275
8302
|
|
|
8276
|
-
|
|
8303
|
+
_this17.touchAction = undefined;
|
|
8277
8304
|
isSwiping = false;
|
|
8278
8305
|
}
|
|
8279
8306
|
});
|
|
@@ -8282,7 +8309,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8282
8309
|
}, {
|
|
8283
8310
|
key: "enableDrag",
|
|
8284
8311
|
value: function enableDrag() {
|
|
8285
|
-
var
|
|
8312
|
+
var _this18 = this;
|
|
8286
8313
|
|
|
8287
8314
|
var startCoords = {};
|
|
8288
8315
|
var endCoords = {};
|
|
@@ -8291,16 +8318,16 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8291
8318
|
|
|
8292
8319
|
if (this.settings.enableDrag) {
|
|
8293
8320
|
this.outer.on('mousedown.lg', function (e) {
|
|
8294
|
-
|
|
8321
|
+
_this18.dragOrSwipeEnabled = true;
|
|
8295
8322
|
|
|
8296
|
-
var $item =
|
|
8323
|
+
var $item = _this18.getSlideItem(_this18.index);
|
|
8297
8324
|
|
|
8298
8325
|
if ($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) {
|
|
8299
|
-
if (!
|
|
8326
|
+
if (!_this18.outer.hasClass('lg-zoomed') && !_this18.lgBusy) {
|
|
8300
8327
|
e.preventDefault();
|
|
8301
8328
|
|
|
8302
|
-
if (!
|
|
8303
|
-
|
|
8329
|
+
if (!_this18.lgBusy) {
|
|
8330
|
+
_this18.manageSwipeClass();
|
|
8304
8331
|
|
|
8305
8332
|
startCoords = {
|
|
8306
8333
|
pageX: e.pageX,
|
|
@@ -8308,31 +8335,31 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8308
8335
|
};
|
|
8309
8336
|
isDraging = true; // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
|
8310
8337
|
|
|
8311
|
-
|
|
8312
|
-
|
|
8338
|
+
_this18.outer.get().scrollLeft += 1;
|
|
8339
|
+
_this18.outer.get().scrollLeft -= 1; // *
|
|
8313
8340
|
|
|
8314
|
-
|
|
8341
|
+
_this18.outer.removeClass('lg-grab').addClass('lg-grabbing');
|
|
8315
8342
|
|
|
8316
|
-
|
|
8343
|
+
_this18.LGel.trigger(lGEvents.dragStart);
|
|
8317
8344
|
}
|
|
8318
8345
|
}
|
|
8319
8346
|
}
|
|
8320
8347
|
});
|
|
8321
8348
|
$LG(window).on("mousemove.lg.global".concat(this.lgId), function (e) {
|
|
8322
|
-
if (isDraging &&
|
|
8349
|
+
if (isDraging && _this18.lgOpened) {
|
|
8323
8350
|
isMoved = true;
|
|
8324
8351
|
endCoords = {
|
|
8325
8352
|
pageX: e.pageX,
|
|
8326
8353
|
pageY: e.pageY
|
|
8327
8354
|
};
|
|
8328
8355
|
|
|
8329
|
-
|
|
8356
|
+
_this18.touchMove(startCoords, endCoords);
|
|
8330
8357
|
|
|
8331
|
-
|
|
8358
|
+
_this18.LGel.trigger(lGEvents.dragMove);
|
|
8332
8359
|
}
|
|
8333
8360
|
});
|
|
8334
8361
|
$LG(window).on("mouseup.lg.global".concat(this.lgId), function (event) {
|
|
8335
|
-
if (!
|
|
8362
|
+
if (!_this18.lgOpened) {
|
|
8336
8363
|
return;
|
|
8337
8364
|
}
|
|
8338
8365
|
|
|
@@ -8341,18 +8368,18 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8341
8368
|
if (isMoved) {
|
|
8342
8369
|
isMoved = false;
|
|
8343
8370
|
|
|
8344
|
-
|
|
8371
|
+
_this18.touchEnd(endCoords, startCoords, event);
|
|
8345
8372
|
|
|
8346
|
-
|
|
8347
|
-
} else if (
|
|
8348
|
-
|
|
8373
|
+
_this18.LGel.trigger(lGEvents.dragEnd);
|
|
8374
|
+
} else if (_this18.isPosterElement(target)) {
|
|
8375
|
+
_this18.LGel.trigger(lGEvents.posterClick);
|
|
8349
8376
|
} // Prevent execution on click
|
|
8350
8377
|
|
|
8351
8378
|
|
|
8352
8379
|
if (isDraging) {
|
|
8353
8380
|
isDraging = false;
|
|
8354
8381
|
|
|
8355
|
-
|
|
8382
|
+
_this18.outer.removeClass('lg-grabbing').addClass('lg-grab');
|
|
8356
8383
|
}
|
|
8357
8384
|
});
|
|
8358
8385
|
}
|
|
@@ -8360,11 +8387,11 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8360
8387
|
}, {
|
|
8361
8388
|
key: "triggerPosterClick",
|
|
8362
8389
|
value: function triggerPosterClick() {
|
|
8363
|
-
var
|
|
8390
|
+
var _this19 = this;
|
|
8364
8391
|
|
|
8365
8392
|
this.$inner.on('click.lg', function (event) {
|
|
8366
|
-
if (!
|
|
8367
|
-
|
|
8393
|
+
if (!_this19.dragOrSwipeEnabled && _this19.isPosterElement($LG(event.target))) {
|
|
8394
|
+
_this19.LGel.trigger(lGEvents.posterClick);
|
|
8368
8395
|
}
|
|
8369
8396
|
});
|
|
8370
8397
|
}
|
|
@@ -8404,7 +8431,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8404
8431
|
}, {
|
|
8405
8432
|
key: "goToNextSlide",
|
|
8406
8433
|
value: function goToNextSlide(fromTouch) {
|
|
8407
|
-
var
|
|
8434
|
+
var _this20 = this;
|
|
8408
8435
|
|
|
8409
8436
|
var _loop = this.settings.loop;
|
|
8410
8437
|
|
|
@@ -8429,7 +8456,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8429
8456
|
} else if (this.settings.slideEndAnimation && !fromTouch) {
|
|
8430
8457
|
this.outer.addClass('lg-right-end');
|
|
8431
8458
|
setTimeout(function () {
|
|
8432
|
-
|
|
8459
|
+
_this20.outer.removeClass('lg-right-end');
|
|
8433
8460
|
}, 400);
|
|
8434
8461
|
}
|
|
8435
8462
|
}
|
|
@@ -8449,7 +8476,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8449
8476
|
}, {
|
|
8450
8477
|
key: "goToPrevSlide",
|
|
8451
8478
|
value: function goToPrevSlide(fromTouch) {
|
|
8452
|
-
var
|
|
8479
|
+
var _this21 = this;
|
|
8453
8480
|
|
|
8454
8481
|
var _loop = this.settings.loop;
|
|
8455
8482
|
|
|
@@ -8476,7 +8503,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8476
8503
|
} else if (this.settings.slideEndAnimation && !fromTouch) {
|
|
8477
8504
|
this.outer.addClass('lg-left-end');
|
|
8478
8505
|
setTimeout(function () {
|
|
8479
|
-
|
|
8506
|
+
_this21.outer.removeClass('lg-left-end');
|
|
8480
8507
|
}, 400);
|
|
8481
8508
|
}
|
|
8482
8509
|
}
|
|
@@ -8485,30 +8512,30 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8485
8512
|
}, {
|
|
8486
8513
|
key: "keyPress",
|
|
8487
8514
|
value: function keyPress() {
|
|
8488
|
-
var
|
|
8515
|
+
var _this22 = this;
|
|
8489
8516
|
|
|
8490
8517
|
$LG(window).on("keydown.lg.global".concat(this.lgId), function (e) {
|
|
8491
|
-
if (
|
|
8518
|
+
if (_this22.lgOpened && _this22.settings.escKey === true && e.keyCode === 27) {
|
|
8492
8519
|
e.preventDefault();
|
|
8493
8520
|
|
|
8494
|
-
if (
|
|
8495
|
-
|
|
8521
|
+
if (_this22.settings.allowMediaOverlap && _this22.outer.hasClass('lg-can-toggle') && _this22.outer.hasClass('lg-components-open')) {
|
|
8522
|
+
_this22.outer.removeClass('lg-components-open');
|
|
8496
8523
|
} else {
|
|
8497
|
-
|
|
8524
|
+
_this22.closeGallery();
|
|
8498
8525
|
}
|
|
8499
8526
|
}
|
|
8500
8527
|
|
|
8501
|
-
if (
|
|
8528
|
+
if (_this22.lgOpened && _this22.galleryItems.length > 1) {
|
|
8502
8529
|
if (e.keyCode === 37) {
|
|
8503
8530
|
e.preventDefault();
|
|
8504
8531
|
|
|
8505
|
-
|
|
8532
|
+
_this22.goToPrevSlide();
|
|
8506
8533
|
}
|
|
8507
8534
|
|
|
8508
8535
|
if (e.keyCode === 39) {
|
|
8509
8536
|
e.preventDefault();
|
|
8510
8537
|
|
|
8511
|
-
|
|
8538
|
+
_this22.goToNextSlide();
|
|
8512
8539
|
}
|
|
8513
8540
|
}
|
|
8514
8541
|
});
|
|
@@ -8516,13 +8543,13 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8516
8543
|
}, {
|
|
8517
8544
|
key: "arrow",
|
|
8518
8545
|
value: function arrow() {
|
|
8519
|
-
var
|
|
8546
|
+
var _this23 = this;
|
|
8520
8547
|
|
|
8521
8548
|
this.getElementById('lg-prev').on('click.lg', function () {
|
|
8522
|
-
|
|
8549
|
+
_this23.goToPrevSlide();
|
|
8523
8550
|
});
|
|
8524
8551
|
this.getElementById('lg-next').on('click.lg', function () {
|
|
8525
|
-
|
|
8552
|
+
_this23.goToNextSlide();
|
|
8526
8553
|
});
|
|
8527
8554
|
}
|
|
8528
8555
|
}, {
|
|
@@ -8556,20 +8583,28 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8556
8583
|
}, {
|
|
8557
8584
|
key: "mousewheel",
|
|
8558
8585
|
value: function mousewheel() {
|
|
8559
|
-
var
|
|
8586
|
+
var _this24 = this;
|
|
8560
8587
|
|
|
8561
|
-
|
|
8562
|
-
|
|
8588
|
+
var lastCall = 0;
|
|
8589
|
+
this.outer.on('wheel.lg', function (e) {
|
|
8590
|
+
if (!e.deltaY || _this24.galleryItems.length < 2) {
|
|
8563
8591
|
return;
|
|
8564
8592
|
}
|
|
8565
8593
|
|
|
8566
|
-
|
|
8567
|
-
|
|
8568
|
-
|
|
8569
|
-
|
|
8594
|
+
e.preventDefault();
|
|
8595
|
+
var now = new Date().getTime();
|
|
8596
|
+
|
|
8597
|
+
if (now - lastCall < 1000) {
|
|
8598
|
+
return;
|
|
8570
8599
|
}
|
|
8571
8600
|
|
|
8572
|
-
|
|
8601
|
+
lastCall = now;
|
|
8602
|
+
|
|
8603
|
+
if (e.deltaY > 0) {
|
|
8604
|
+
_this24.goToNextSlide();
|
|
8605
|
+
} else if (e.deltaY < 0) {
|
|
8606
|
+
_this24.goToPrevSlide();
|
|
8607
|
+
}
|
|
8573
8608
|
});
|
|
8574
8609
|
}
|
|
8575
8610
|
}, {
|
|
@@ -8591,12 +8626,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8591
8626
|
}, {
|
|
8592
8627
|
key: "toggleMaximize",
|
|
8593
8628
|
value: function toggleMaximize() {
|
|
8594
|
-
var
|
|
8629
|
+
var _this25 = this;
|
|
8595
8630
|
|
|
8596
8631
|
this.getElementById('lg-maximize').on('click.lg', function () {
|
|
8597
|
-
|
|
8632
|
+
_this25.$container.toggleClass('lg-inline');
|
|
8598
8633
|
|
|
8599
|
-
|
|
8634
|
+
_this25.refreshOnResize();
|
|
8600
8635
|
});
|
|
8601
8636
|
}
|
|
8602
8637
|
}, {
|
|
@@ -8611,12 +8646,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8611
8646
|
}, {
|
|
8612
8647
|
key: "manageCloseGallery",
|
|
8613
8648
|
value: function manageCloseGallery() {
|
|
8614
|
-
var
|
|
8649
|
+
var _this26 = this;
|
|
8615
8650
|
|
|
8616
8651
|
if (!this.settings.closable) return;
|
|
8617
8652
|
var mousedown = false;
|
|
8618
8653
|
this.getElementById('lg-close').on('click.lg', function () {
|
|
8619
|
-
|
|
8654
|
+
_this26.closeGallery();
|
|
8620
8655
|
});
|
|
8621
8656
|
|
|
8622
8657
|
if (this.settings.closeOnTap) {
|
|
@@ -8625,7 +8660,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8625
8660
|
this.outer.on('mousedown.lg', function (e) {
|
|
8626
8661
|
var target = $LG(e.target);
|
|
8627
8662
|
|
|
8628
|
-
if (
|
|
8663
|
+
if (_this26.isSlideElement(target)) {
|
|
8629
8664
|
mousedown = true;
|
|
8630
8665
|
} else {
|
|
8631
8666
|
mousedown = false;
|
|
@@ -8637,9 +8672,9 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8637
8672
|
this.outer.on('mouseup.lg', function (e) {
|
|
8638
8673
|
var target = $LG(e.target);
|
|
8639
8674
|
|
|
8640
|
-
if (
|
|
8641
|
-
if (!
|
|
8642
|
-
|
|
8675
|
+
if (_this26.isSlideElement(target) && mousedown) {
|
|
8676
|
+
if (!_this26.outer.hasClass('lg-dragging')) {
|
|
8677
|
+
_this26.closeGallery();
|
|
8643
8678
|
}
|
|
8644
8679
|
}
|
|
8645
8680
|
});
|
|
@@ -8660,7 +8695,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8660
8695
|
}, {
|
|
8661
8696
|
key: "closeGallery",
|
|
8662
8697
|
value: function closeGallery(force) {
|
|
8663
|
-
var
|
|
8698
|
+
var _this27 = this;
|
|
8664
8699
|
|
|
8665
8700
|
if (!this.lgOpened || !this.settings.closable && !force) {
|
|
8666
8701
|
return 0;
|
|
@@ -8709,32 +8744,32 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8709
8744
|
this.$container.removeClass('lg-show-in'); // Once the closign animation is completed and gallery is invisible
|
|
8710
8745
|
|
|
8711
8746
|
setTimeout(function () {
|
|
8712
|
-
if (
|
|
8713
|
-
|
|
8747
|
+
if (_this27.zoomFromOrigin && transform) {
|
|
8748
|
+
_this27.outer.removeClass('lg-zoom-from-image');
|
|
8714
8749
|
}
|
|
8715
8750
|
|
|
8716
|
-
|
|
8751
|
+
_this27.$container.removeClass('lg-show'); // Need to remove inline opacity as it is used in the stylesheet as well
|
|
8717
8752
|
|
|
8718
8753
|
|
|
8719
|
-
|
|
8754
|
+
_this27.$backdrop.removeAttr('style').css('transition-duration', _this27.settings.backdropDuration + 'ms');
|
|
8720
8755
|
|
|
8721
|
-
|
|
8756
|
+
_this27.outer.removeClass("lg-closing ".concat(_this27.settings.startClass));
|
|
8722
8757
|
|
|
8723
|
-
|
|
8758
|
+
_this27.getSlideItem(_this27.index).removeClass('lg-start-end-progress');
|
|
8724
8759
|
|
|
8725
|
-
|
|
8760
|
+
_this27.$inner.empty();
|
|
8726
8761
|
|
|
8727
|
-
if (
|
|
8728
|
-
|
|
8729
|
-
instance:
|
|
8762
|
+
if (_this27.lgOpened) {
|
|
8763
|
+
_this27.LGel.trigger(lGEvents.afterClose, {
|
|
8764
|
+
instance: _this27
|
|
8730
8765
|
});
|
|
8731
8766
|
}
|
|
8732
8767
|
|
|
8733
|
-
if (
|
|
8734
|
-
|
|
8768
|
+
if (_this27.outer.get()) {
|
|
8769
|
+
_this27.outer.get().blur();
|
|
8735
8770
|
}
|
|
8736
8771
|
|
|
8737
|
-
|
|
8772
|
+
_this27.lgOpened = false;
|
|
8738
8773
|
}, removeTimeout + 100);
|
|
8739
8774
|
return removeTimeout + 100;
|
|
8740
8775
|
}
|
|
@@ -8820,21 +8855,21 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8820
8855
|
}, {
|
|
8821
8856
|
key: "destroy",
|
|
8822
8857
|
value: function destroy() {
|
|
8823
|
-
var
|
|
8858
|
+
var _this28 = this;
|
|
8824
8859
|
|
|
8825
8860
|
var closeTimeout = this.closeGallery(true);
|
|
8826
8861
|
setTimeout(function () {
|
|
8827
|
-
|
|
8862
|
+
_this28.destroyModules(true);
|
|
8828
8863
|
|
|
8829
|
-
if (!
|
|
8830
|
-
|
|
8864
|
+
if (!_this28.settings.dynamic) {
|
|
8865
|
+
_this28.invalidateItems();
|
|
8831
8866
|
}
|
|
8832
8867
|
|
|
8833
|
-
$LG(window).off(".lg.global".concat(
|
|
8868
|
+
$LG(window).off(".lg.global".concat(_this28.lgId));
|
|
8834
8869
|
|
|
8835
|
-
|
|
8870
|
+
_this28.LGel.off('.lg');
|
|
8836
8871
|
|
|
8837
|
-
|
|
8872
|
+
_this28.$container.remove();
|
|
8838
8873
|
}, closeTimeout);
|
|
8839
8874
|
return closeTimeout;
|
|
8840
8875
|
}
|
|
@@ -8974,6 +9009,18 @@ LightGalleryvue_type_script_lang_ts_Lightgallery = __decorate([Options({
|
|
|
8974
9009
|
},
|
|
8975
9010
|
onAfterClose: {
|
|
8976
9011
|
type: Function
|
|
9012
|
+
},
|
|
9013
|
+
onRotateLeft: {
|
|
9014
|
+
type: Function
|
|
9015
|
+
},
|
|
9016
|
+
onRotateRight: {
|
|
9017
|
+
type: Function
|
|
9018
|
+
},
|
|
9019
|
+
onFlipHorizontal: {
|
|
9020
|
+
type: Function
|
|
9021
|
+
},
|
|
9022
|
+
onFlipVertical: {
|
|
9023
|
+
type: Function
|
|
8977
9024
|
}
|
|
8978
9025
|
}
|
|
8979
9026
|
})], LightGalleryvue_type_script_lang_ts_Lightgallery);
|