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
|
@@ -4850,7 +4850,7 @@ if (typeof window !== 'undefined') {
|
|
|
4850
4850
|
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
4851
4851
|
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
4852
4852
|
|
|
4853
|
-
// 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=
|
|
4853
|
+
// 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
|
|
4854
4854
|
|
|
4855
4855
|
var _hoisted_1 = {
|
|
4856
4856
|
ref: "container",
|
|
@@ -4859,7 +4859,7 @@ var _hoisted_1 = {
|
|
|
4859
4859
|
function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4860
4860
|
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);
|
|
4861
4861
|
}
|
|
4862
|
-
// CONCATENATED MODULE: ./src/components/LightGallery.vue?vue&type=template&id=
|
|
4862
|
+
// CONCATENATED MODULE: ./src/components/LightGallery.vue?vue&type=template&id=47173610
|
|
4863
4863
|
|
|
4864
4864
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
|
|
4865
4865
|
var es_object_keys = __webpack_require__("b64b");
|
|
@@ -5805,6 +5805,116 @@ var es_array_concat = __webpack_require__("99af");
|
|
|
5805
5805
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
|
|
5806
5806
|
var es_array_find = __webpack_require__("7db0");
|
|
5807
5807
|
|
|
5808
|
+
// CONCATENATED MODULE: ../src/lg-events.ts
|
|
5809
|
+
/**
|
|
5810
|
+
* List of lightGallery events
|
|
5811
|
+
* All events should be documented here
|
|
5812
|
+
* Below interfaces are used to build the website documentations
|
|
5813
|
+
* */
|
|
5814
|
+
var lGEvents = {
|
|
5815
|
+
afterAppendSlide: 'lgAfterAppendSlide',
|
|
5816
|
+
init: 'lgInit',
|
|
5817
|
+
hasVideo: 'lgHasVideo',
|
|
5818
|
+
containerResize: 'lgContainerResize',
|
|
5819
|
+
updateSlides: 'lgUpdateSlides',
|
|
5820
|
+
afterAppendSubHtml: 'lgAfterAppendSubHtml',
|
|
5821
|
+
beforeOpen: 'lgBeforeOpen',
|
|
5822
|
+
afterOpen: 'lgAfterOpen',
|
|
5823
|
+
slideItemLoad: 'lgSlideItemLoad',
|
|
5824
|
+
beforeSlide: 'lgBeforeSlide',
|
|
5825
|
+
afterSlide: 'lgAfterSlide',
|
|
5826
|
+
posterClick: 'lgPosterClick',
|
|
5827
|
+
dragStart: 'lgDragStart',
|
|
5828
|
+
dragMove: 'lgDragMove',
|
|
5829
|
+
dragEnd: 'lgDragEnd',
|
|
5830
|
+
beforeNextSlide: 'lgBeforeNextSlide',
|
|
5831
|
+
beforePrevSlide: 'lgBeforePrevSlide',
|
|
5832
|
+
beforeClose: 'lgBeforeClose',
|
|
5833
|
+
afterClose: 'lgAfterClose',
|
|
5834
|
+
rotateLeft: 'lgRotateLeft',
|
|
5835
|
+
rotateRight: 'lgRotateRight',
|
|
5836
|
+
flipHorizontal: 'lgFlipHorizontal',
|
|
5837
|
+
flipVertical: 'lgFlipVertical',
|
|
5838
|
+
autoplay: 'lgAutoplay',
|
|
5839
|
+
autoplayStart: 'lgAutoplayStart',
|
|
5840
|
+
autoplayStop: 'lgAutoplayStop'
|
|
5841
|
+
};
|
|
5842
|
+
// CONCATENATED MODULE: ../src/lg-settings.ts
|
|
5843
|
+
var lightGalleryCoreSettings = {
|
|
5844
|
+
mode: 'lg-slide',
|
|
5845
|
+
easing: 'ease',
|
|
5846
|
+
speed: 400,
|
|
5847
|
+
licenseKey: '0000-0000-000-0000',
|
|
5848
|
+
height: '100%',
|
|
5849
|
+
width: '100%',
|
|
5850
|
+
addClass: '',
|
|
5851
|
+
startClass: 'lg-start-zoom',
|
|
5852
|
+
backdropDuration: 300,
|
|
5853
|
+
container: '',
|
|
5854
|
+
startAnimationDuration: 400,
|
|
5855
|
+
zoomFromOrigin: true,
|
|
5856
|
+
hideBarsDelay: 0,
|
|
5857
|
+
showBarsAfter: 10000,
|
|
5858
|
+
slideDelay: 0,
|
|
5859
|
+
supportLegacyBrowser: true,
|
|
5860
|
+
allowMediaOverlap: false,
|
|
5861
|
+
videoMaxSize: '1280-720',
|
|
5862
|
+
loadYouTubePoster: true,
|
|
5863
|
+
defaultCaptionHeight: 0,
|
|
5864
|
+
ariaLabelledby: '',
|
|
5865
|
+
ariaDescribedby: '',
|
|
5866
|
+
closable: true,
|
|
5867
|
+
swipeToClose: true,
|
|
5868
|
+
closeOnTap: true,
|
|
5869
|
+
showCloseIcon: true,
|
|
5870
|
+
showMaximizeIcon: false,
|
|
5871
|
+
loop: true,
|
|
5872
|
+
escKey: true,
|
|
5873
|
+
keyPress: true,
|
|
5874
|
+
controls: true,
|
|
5875
|
+
slideEndAnimation: true,
|
|
5876
|
+
hideControlOnEnd: false,
|
|
5877
|
+
mousewheel: false,
|
|
5878
|
+
getCaptionFromTitleOrAlt: true,
|
|
5879
|
+
appendSubHtmlTo: '.lg-sub-html',
|
|
5880
|
+
subHtmlSelectorRelative: false,
|
|
5881
|
+
preload: 2,
|
|
5882
|
+
numberOfSlideItemsInDom: 10,
|
|
5883
|
+
selector: '',
|
|
5884
|
+
selectWithin: '',
|
|
5885
|
+
nextHtml: '',
|
|
5886
|
+
prevHtml: '',
|
|
5887
|
+
index: 0,
|
|
5888
|
+
iframeWidth: '100%',
|
|
5889
|
+
iframeHeight: '100%',
|
|
5890
|
+
iframeMaxWidth: '100%',
|
|
5891
|
+
iframeMaxHeight: '100%',
|
|
5892
|
+
download: true,
|
|
5893
|
+
counter: true,
|
|
5894
|
+
appendCounterTo: '.lg-toolbar',
|
|
5895
|
+
swipeThreshold: 50,
|
|
5896
|
+
enableSwipe: true,
|
|
5897
|
+
enableDrag: true,
|
|
5898
|
+
dynamic: false,
|
|
5899
|
+
dynamicEl: [],
|
|
5900
|
+
extraProps: [],
|
|
5901
|
+
exThumbImage: '',
|
|
5902
|
+
isMobile: undefined,
|
|
5903
|
+
mobileSettings: {
|
|
5904
|
+
controls: false,
|
|
5905
|
+
showCloseIcon: false,
|
|
5906
|
+
download: false
|
|
5907
|
+
},
|
|
5908
|
+
plugins: [],
|
|
5909
|
+
strings: {
|
|
5910
|
+
closeGallery: 'Close gallery',
|
|
5911
|
+
toggleMaximize: 'Toggle maximize',
|
|
5912
|
+
previousSlide: 'Previous slide',
|
|
5913
|
+
nextSlide: 'Next slide',
|
|
5914
|
+
download: 'Download',
|
|
5915
|
+
playVideo: 'Play video'
|
|
5916
|
+
}
|
|
5917
|
+
};
|
|
5808
5918
|
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
|
5809
5919
|
function arrayLikeToArray_arrayLikeToArray(arr, len) {
|
|
5810
5920
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -5915,28 +6025,30 @@ var es_regexp_to_string = __webpack_require__("25f0");
|
|
|
5915
6025
|
|
|
5916
6026
|
|
|
5917
6027
|
|
|
5918
|
-
|
|
5919
|
-
|
|
6028
|
+
function initLgPolyfills() {
|
|
6029
|
+
(function () {
|
|
6030
|
+
if (typeof window.CustomEvent === 'function') return false;
|
|
5920
6031
|
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
6032
|
+
function CustomEvent(event, params) {
|
|
6033
|
+
params = params || {
|
|
6034
|
+
bubbles: false,
|
|
6035
|
+
cancelable: false,
|
|
6036
|
+
detail: null
|
|
6037
|
+
};
|
|
6038
|
+
var evt = document.createEvent('CustomEvent');
|
|
6039
|
+
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
|
|
6040
|
+
return evt;
|
|
6041
|
+
}
|
|
5931
6042
|
|
|
5932
|
-
|
|
5933
|
-
})();
|
|
6043
|
+
window.CustomEvent = CustomEvent;
|
|
6044
|
+
})();
|
|
5934
6045
|
|
|
5935
|
-
(function () {
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
})();
|
|
6046
|
+
(function () {
|
|
6047
|
+
if (!Element.prototype.matches) {
|
|
6048
|
+
Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
6049
|
+
}
|
|
6050
|
+
})();
|
|
6051
|
+
}
|
|
5940
6052
|
|
|
5941
6053
|
var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
5942
6054
|
function lgQuery(selector) {
|
|
@@ -6099,7 +6211,9 @@ var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
|
6099
6211
|
this._each(function (el) {
|
|
6100
6212
|
// IE doesn't support multiple arguments
|
|
6101
6213
|
classNames.split(' ').forEach(function (className) {
|
|
6102
|
-
|
|
6214
|
+
if (className) {
|
|
6215
|
+
el.classList.add(className);
|
|
6216
|
+
}
|
|
6103
6217
|
});
|
|
6104
6218
|
});
|
|
6105
6219
|
|
|
@@ -6111,7 +6225,9 @@ var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
|
6111
6225
|
this._each(function (el) {
|
|
6112
6226
|
// IE doesn't support multiple arguments
|
|
6113
6227
|
classNames.split(' ').forEach(function (className) {
|
|
6114
|
-
|
|
6228
|
+
if (className) {
|
|
6229
|
+
el.classList.remove(className);
|
|
6230
|
+
}
|
|
6115
6231
|
});
|
|
6116
6232
|
});
|
|
6117
6233
|
|
|
@@ -6373,6 +6489,7 @@ var lgQuery_lgQuery = /*#__PURE__*/function () {
|
|
|
6373
6489
|
}();
|
|
6374
6490
|
lgQuery_lgQuery.eventListeners = {};
|
|
6375
6491
|
function $LG(selector) {
|
|
6492
|
+
initLgPolyfills();
|
|
6376
6493
|
return new lgQuery_lgQuery(selector);
|
|
6377
6494
|
}
|
|
6378
6495
|
// CONCATENATED MODULE: ../src/lg-utils.ts
|
|
@@ -6484,9 +6601,9 @@ var utils = {
|
|
|
6484
6601
|
var transform = 'translate3d(' + (x *= -1) + 'px, ' + (y *= -1) + 'px, 0) scale3d(' + scX + ', ' + scY + ', 1)';
|
|
6485
6602
|
return transform;
|
|
6486
6603
|
},
|
|
6487
|
-
getIframeMarkup: function getIframeMarkup(iframeWidth, iframeHeight, src, iframeTitle) {
|
|
6604
|
+
getIframeMarkup: function getIframeMarkup(iframeWidth, iframeHeight, iframeMaxWidth, iframeMaxHeight, src, iframeTitle) {
|
|
6488
6605
|
var title = iframeTitle ? 'title="' + iframeTitle + '"' : '';
|
|
6489
|
-
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>");
|
|
6606
|
+
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>");
|
|
6490
6607
|
},
|
|
6491
6608
|
getImgMarkup: function getImgMarkup(index, src, altAttr, srcset, sizes, sources) {
|
|
6492
6609
|
var srcsetAttr = srcset ? "srcset=\"".concat(srcset, "\"") : '';
|
|
@@ -6556,7 +6673,7 @@ var utils = {
|
|
|
6556
6673
|
|
|
6557
6674
|
return true;
|
|
6558
6675
|
},
|
|
6559
|
-
getVideoPosterMarkup: function getVideoPosterMarkup(_poster, dummyImg, videoContStyle, _isVideo) {
|
|
6676
|
+
getVideoPosterMarkup: function getVideoPosterMarkup(_poster, dummyImg, videoContStyle, playVideoString, _isVideo) {
|
|
6560
6677
|
var videoClass = '';
|
|
6561
6678
|
|
|
6562
6679
|
if (_isVideo && _isVideo.youtube) {
|
|
@@ -6567,7 +6684,7 @@ var utils = {
|
|
|
6567
6684
|
videoClass = 'lg-has-html5';
|
|
6568
6685
|
}
|
|
6569
6686
|
|
|
6570
|
-
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=\"
|
|
6687
|
+
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>");
|
|
6571
6688
|
},
|
|
6572
6689
|
|
|
6573
6690
|
/**
|
|
@@ -6659,103 +6776,6 @@ var utils = {
|
|
|
6659
6776
|
}
|
|
6660
6777
|
};
|
|
6661
6778
|
/* harmony default export */ var lg_utils = (utils);
|
|
6662
|
-
// CONCATENATED MODULE: ../src/lg-settings.ts
|
|
6663
|
-
var lightGalleryCoreSettings = {
|
|
6664
|
-
mode: 'lg-slide',
|
|
6665
|
-
easing: 'ease',
|
|
6666
|
-
speed: 400,
|
|
6667
|
-
licenseKey: '0000-0000-000-0000',
|
|
6668
|
-
height: '100%',
|
|
6669
|
-
width: '100%',
|
|
6670
|
-
addClass: '',
|
|
6671
|
-
startClass: 'lg-start-zoom',
|
|
6672
|
-
backdropDuration: 300,
|
|
6673
|
-
container: document.body,
|
|
6674
|
-
startAnimationDuration: 400,
|
|
6675
|
-
zoomFromOrigin: true,
|
|
6676
|
-
hideBarsDelay: 0,
|
|
6677
|
-
showBarsAfter: 10000,
|
|
6678
|
-
slideDelay: 0,
|
|
6679
|
-
supportLegacyBrowser: true,
|
|
6680
|
-
allowMediaOverlap: false,
|
|
6681
|
-
videoMaxSize: '1280-720',
|
|
6682
|
-
defaultCaptionHeight: 0,
|
|
6683
|
-
ariaLabelledby: '',
|
|
6684
|
-
ariaDescribedby: '',
|
|
6685
|
-
closable: true,
|
|
6686
|
-
swipeToClose: true,
|
|
6687
|
-
closeOnTap: true,
|
|
6688
|
-
showCloseIcon: true,
|
|
6689
|
-
showMaximizeIcon: false,
|
|
6690
|
-
loop: true,
|
|
6691
|
-
escKey: true,
|
|
6692
|
-
keyPress: true,
|
|
6693
|
-
controls: true,
|
|
6694
|
-
slideEndAnimation: true,
|
|
6695
|
-
hideControlOnEnd: false,
|
|
6696
|
-
mousewheel: false,
|
|
6697
|
-
getCaptionFromTitleOrAlt: true,
|
|
6698
|
-
appendSubHtmlTo: '.lg-sub-html',
|
|
6699
|
-
subHtmlSelectorRelative: false,
|
|
6700
|
-
preload: 2,
|
|
6701
|
-
numberOfSlideItemsInDom: 10,
|
|
6702
|
-
showAfterLoad: true,
|
|
6703
|
-
selector: '',
|
|
6704
|
-
selectWithin: '',
|
|
6705
|
-
nextHtml: '',
|
|
6706
|
-
prevHtml: '',
|
|
6707
|
-
index: 0,
|
|
6708
|
-
iframeWidth: '100%',
|
|
6709
|
-
iframeHeight: '100%',
|
|
6710
|
-
download: true,
|
|
6711
|
-
counter: true,
|
|
6712
|
-
appendCounterTo: '.lg-toolbar',
|
|
6713
|
-
swipeThreshold: 50,
|
|
6714
|
-
enableSwipe: true,
|
|
6715
|
-
enableDrag: true,
|
|
6716
|
-
dynamic: false,
|
|
6717
|
-
dynamicEl: [],
|
|
6718
|
-
extraProps: [],
|
|
6719
|
-
exThumbImage: '',
|
|
6720
|
-
isMobile: undefined,
|
|
6721
|
-
mobileSettings: {
|
|
6722
|
-
controls: false,
|
|
6723
|
-
showCloseIcon: false,
|
|
6724
|
-
download: false
|
|
6725
|
-
},
|
|
6726
|
-
plugins: []
|
|
6727
|
-
};
|
|
6728
|
-
// CONCATENATED MODULE: ../src/lg-events.ts
|
|
6729
|
-
/**
|
|
6730
|
-
* List of lightGallery events
|
|
6731
|
-
* All events should be documented here
|
|
6732
|
-
* Below interfaces are used to build the website documentations
|
|
6733
|
-
* */
|
|
6734
|
-
var lGEvents = {
|
|
6735
|
-
afterAppendSlide: 'lgAfterAppendSlide',
|
|
6736
|
-
init: 'lgInit',
|
|
6737
|
-
hasVideo: 'lgHasVideo',
|
|
6738
|
-
containerResize: 'lgContainerResize',
|
|
6739
|
-
updateSlides: 'lgUpdateSlides',
|
|
6740
|
-
afterAppendSubHtml: 'lgAfterAppendSubHtml',
|
|
6741
|
-
beforeOpen: 'lgBeforeOpen',
|
|
6742
|
-
afterOpen: 'lgAfterOpen',
|
|
6743
|
-
slideItemLoad: 'lgSlideItemLoad',
|
|
6744
|
-
beforeSlide: 'lgBeforeSlide',
|
|
6745
|
-
afterSlide: 'lgAfterSlide',
|
|
6746
|
-
posterClick: 'lgPosterClick',
|
|
6747
|
-
dragStart: 'lgDragStart',
|
|
6748
|
-
dragMove: 'lgDragMove',
|
|
6749
|
-
dragEnd: 'lgDragEnd',
|
|
6750
|
-
beforeNextSlide: 'lgBeforeNextSlide',
|
|
6751
|
-
beforePrevSlide: 'lgBeforePrevSlide',
|
|
6752
|
-
beforeClose: 'lgBeforeClose',
|
|
6753
|
-
afterClose: 'lgAfterClose',
|
|
6754
|
-
rotateLeft: 'lgRotateLeft',
|
|
6755
|
-
rotateRight: 'lgRotateRight',
|
|
6756
|
-
flipHorizontal: 'lgFlipHorizontal',
|
|
6757
|
-
flipVertical: 'lgFlipVertical'
|
|
6758
|
-
};
|
|
6759
6779
|
// CONCATENATED MODULE: ../src/lightgallery.ts
|
|
6760
6780
|
|
|
6761
6781
|
|
|
@@ -6981,7 +7001,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
6981
7001
|
var subHtmlCont = ''; // Create controls
|
|
6982
7002
|
|
|
6983
7003
|
if (this.settings.controls) {
|
|
6984
|
-
controls = "<button type=\"button\" id=\"".concat(this.getIdName('lg-prev'), "\" aria-label=\"
|
|
7004
|
+
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>");
|
|
6985
7005
|
}
|
|
6986
7006
|
|
|
6987
7007
|
if (this.settings.appendSubHtmlTo !== '.lg-item') {
|
|
@@ -6998,10 +7018,15 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
6998
7018
|
var ariaLabelledby = this.settings.ariaLabelledby ? 'aria-labelledby="' + this.settings.ariaLabelledby + '"' : '';
|
|
6999
7019
|
var ariaDescribedby = this.settings.ariaDescribedby ? 'aria-describedby="' + this.settings.ariaDescribedby + '"' : '';
|
|
7000
7020
|
var containerClassName = "lg-container ".concat(this.settings.addClass, " ").concat(document.body !== this.settings.container ? 'lg-inline' : '');
|
|
7001
|
-
var closeIcon = this.settings.closable && this.settings.showCloseIcon ? "<button type=\"button\" aria-label=\"
|
|
7002
|
-
var maximizeIcon = this.settings.showMaximizeIcon ? "<button type=\"button\" aria-label=\"
|
|
7021
|
+
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>") : '';
|
|
7022
|
+
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>") : '';
|
|
7003
7023
|
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 ");
|
|
7004
|
-
$LG(this.settings.container).
|
|
7024
|
+
$LG(this.settings.container).append(template);
|
|
7025
|
+
|
|
7026
|
+
if (document.body !== this.settings.container) {
|
|
7027
|
+
$LG(this.settings.container).css('position', 'relative');
|
|
7028
|
+
}
|
|
7029
|
+
|
|
7005
7030
|
this.outer = this.getElementById('lg-outer');
|
|
7006
7031
|
this.$lgComponents = this.getElementById('lg-components');
|
|
7007
7032
|
this.$backdrop = this.getElementById('lg-backdrop');
|
|
@@ -7017,16 +7042,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7017
7042
|
outerClassNames += 'lg-grab ';
|
|
7018
7043
|
}
|
|
7019
7044
|
|
|
7020
|
-
if (this.settings.showAfterLoad) {
|
|
7021
|
-
outerClassNames += 'lg-show-after-load';
|
|
7022
|
-
}
|
|
7023
|
-
|
|
7024
7045
|
this.outer.addClass(outerClassNames);
|
|
7025
7046
|
this.$inner.css('transition-timing-function', this.settings.easing);
|
|
7026
7047
|
this.$inner.css('transition-duration', this.settings.speed + 'ms');
|
|
7027
7048
|
|
|
7028
7049
|
if (this.settings.download) {
|
|
7029
|
-
this.$toolbar.append("<a id=\"".concat(this.getIdName('lg-download'), "\" target=\"_blank\" rel=\"noopener\" aria-label=\"
|
|
7050
|
+
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>"));
|
|
7030
7051
|
}
|
|
7031
7052
|
|
|
7032
7053
|
this.counter();
|
|
@@ -7605,8 +7626,14 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7605
7626
|
}, {
|
|
7606
7627
|
key: "addSlideVideoInfo",
|
|
7607
7628
|
value: function addSlideVideoInfo(items) {
|
|
7629
|
+
var _this9 = this;
|
|
7630
|
+
|
|
7608
7631
|
items.forEach(function (element, index) {
|
|
7609
7632
|
element.__slideVideoInfo = lg_utils.isVideo(element.src, !!element.video, index);
|
|
7633
|
+
|
|
7634
|
+
if (element.__slideVideoInfo && _this9.settings.loadYouTubePoster && !element.poster && element.__slideVideoInfo.youtube) {
|
|
7635
|
+
element.poster = "//img.youtube.com/vi/".concat(element.__slideVideoInfo.youtube[1], "/maxresdefault.jpg");
|
|
7636
|
+
}
|
|
7610
7637
|
});
|
|
7611
7638
|
}
|
|
7612
7639
|
/**
|
|
@@ -7619,7 +7646,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7619
7646
|
}, {
|
|
7620
7647
|
key: "loadContent",
|
|
7621
7648
|
value: function loadContent(index, rec) {
|
|
7622
|
-
var
|
|
7649
|
+
var _this10 = this;
|
|
7623
7650
|
|
|
7624
7651
|
var currentGalleryItem = this.galleryItems[index];
|
|
7625
7652
|
var $currentSlide = $LG(this.getSlideItemId(index));
|
|
@@ -7662,7 +7689,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7662
7689
|
}
|
|
7663
7690
|
|
|
7664
7691
|
if (iframe) {
|
|
7665
|
-
var markup = lg_utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, src, currentGalleryItem.iframeTitle);
|
|
7692
|
+
var markup = lg_utils.getIframeMarkup(this.settings.iframeWidth, this.settings.iframeHeight, this.settings.iframeMaxWidth, this.settings.iframeMaxHeight, src, currentGalleryItem.iframeTitle);
|
|
7666
7693
|
$currentSlide.prepend(markup);
|
|
7667
7694
|
} else if (poster) {
|
|
7668
7695
|
var dummyImg = '';
|
|
@@ -7672,7 +7699,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7672
7699
|
dummyImg = this.getDummyImageContent($currentSlide, index, '');
|
|
7673
7700
|
}
|
|
7674
7701
|
|
|
7675
|
-
var _markup = lg_utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, videoInfo);
|
|
7702
|
+
var _markup = lg_utils.getVideoPosterMarkup(poster, dummyImg || '', lgVideoStyle, this.settings.strings['playVideo'], videoInfo);
|
|
7676
7703
|
|
|
7677
7704
|
$currentSlide.prepend(_markup);
|
|
7678
7705
|
} else if (videoInfo) {
|
|
@@ -7722,24 +7749,24 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7722
7749
|
|
|
7723
7750
|
if (!$currentSlide.hasClass('lg-loaded')) {
|
|
7724
7751
|
setTimeout(function () {
|
|
7725
|
-
if (
|
|
7752
|
+
if (_this10.getSlideType(currentGalleryItem) === 'image') {
|
|
7726
7753
|
$currentSlide.find('.lg-img-wrap').append(lg_utils.getImgMarkup(index, src, '', srcset, sizes, currentGalleryItem.sources));
|
|
7727
7754
|
|
|
7728
7755
|
if (srcset || sources) {
|
|
7729
7756
|
var _$img = $currentSlide.find('.lg-object');
|
|
7730
7757
|
|
|
7731
|
-
|
|
7758
|
+
_this10.initPictureFill(_$img);
|
|
7732
7759
|
}
|
|
7733
7760
|
}
|
|
7734
7761
|
|
|
7735
|
-
if (
|
|
7736
|
-
|
|
7762
|
+
if (_this10.getSlideType(currentGalleryItem) === 'image' || _this10.getSlideType(currentGalleryItem) === 'video' && poster) {
|
|
7763
|
+
_this10.onLgObjectLoad($currentSlide, index, delay, _speed, true, false); // load remaining slides once the slide is completely loaded
|
|
7737
7764
|
|
|
7738
7765
|
|
|
7739
|
-
|
|
7740
|
-
|
|
7766
|
+
_this10.onSlideObjectLoad($currentSlide, !!(videoInfo && videoInfo.html5 && !poster), function () {
|
|
7767
|
+
_this10.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);
|
|
7741
7768
|
}, function () {
|
|
7742
|
-
|
|
7769
|
+
_this10.loadContentOnFirstSlideLoad(index, $currentSlide, _speed);
|
|
7743
7770
|
});
|
|
7744
7771
|
}
|
|
7745
7772
|
}, this.settings.startAnimationDuration + 100);
|
|
@@ -7767,7 +7794,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7767
7794
|
if (rec === true) {
|
|
7768
7795
|
if (!$currentSlide.hasClass('lg-complete_')) {
|
|
7769
7796
|
$currentSlide.find('.lg-object').first().on('load.lg error.lg', function () {
|
|
7770
|
-
|
|
7797
|
+
_this10.preload(index);
|
|
7771
7798
|
});
|
|
7772
7799
|
} else {
|
|
7773
7800
|
this.preload(index);
|
|
@@ -7785,23 +7812,23 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7785
7812
|
}, {
|
|
7786
7813
|
key: "loadContentOnFirstSlideLoad",
|
|
7787
7814
|
value: function loadContentOnFirstSlideLoad(index, $currentSlide, speed) {
|
|
7788
|
-
var
|
|
7815
|
+
var _this11 = this;
|
|
7789
7816
|
|
|
7790
7817
|
setTimeout(function () {
|
|
7791
7818
|
$currentSlide.find('.lg-dummy-img').remove();
|
|
7792
7819
|
$currentSlide.removeClass('lg-first-slide');
|
|
7793
7820
|
|
|
7794
|
-
|
|
7821
|
+
_this11.outer.removeClass('lg-first-slide-loading');
|
|
7795
7822
|
|
|
7796
|
-
|
|
7823
|
+
_this11.isDummyImageRemoved = true;
|
|
7797
7824
|
|
|
7798
|
-
|
|
7825
|
+
_this11.preload(index);
|
|
7799
7826
|
}, speed + 300);
|
|
7800
7827
|
}
|
|
7801
7828
|
}, {
|
|
7802
7829
|
key: "getItemsToBeInsertedToDom",
|
|
7803
7830
|
value: function getItemsToBeInsertedToDom(index, prevIndex) {
|
|
7804
|
-
var
|
|
7831
|
+
var _this12 = this;
|
|
7805
7832
|
|
|
7806
7833
|
var numberOfItems = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
7807
7834
|
var itemsToBeInsertedToDom = []; // Minimum 2 items should be there
|
|
@@ -7812,7 +7839,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7812
7839
|
|
|
7813
7840
|
if (this.galleryItems.length <= 3) {
|
|
7814
7841
|
this.galleryItems.forEach(function (_element, index) {
|
|
7815
|
-
itemsToBeInsertedToDom.push("lg-item-".concat(
|
|
7842
|
+
itemsToBeInsertedToDom.push("lg-item-".concat(_this12.lgId, "-").concat(index));
|
|
7816
7843
|
});
|
|
7817
7844
|
return itemsToBeInsertedToDom;
|
|
7818
7845
|
}
|
|
@@ -7856,12 +7883,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7856
7883
|
}, {
|
|
7857
7884
|
key: "organizeSlideItems",
|
|
7858
7885
|
value: function organizeSlideItems(index, prevIndex) {
|
|
7859
|
-
var
|
|
7886
|
+
var _this13 = this;
|
|
7860
7887
|
|
|
7861
7888
|
var itemsToBeInsertedToDom = this.getItemsToBeInsertedToDom(index, prevIndex, this.settings.numberOfSlideItemsInDom);
|
|
7862
7889
|
itemsToBeInsertedToDom.forEach(function (item) {
|
|
7863
|
-
if (
|
|
7864
|
-
|
|
7890
|
+
if (_this13.currentItemsInDom.indexOf(item) === -1) {
|
|
7891
|
+
_this13.$inner.append("<div id=\"".concat(item, "\" class=\"lg-item\"></div>"));
|
|
7865
7892
|
}
|
|
7866
7893
|
});
|
|
7867
7894
|
this.currentItemsInDom.forEach(function (item) {
|
|
@@ -7912,7 +7939,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7912
7939
|
}, {
|
|
7913
7940
|
key: "makeSlideAnimation",
|
|
7914
7941
|
value: function makeSlideAnimation(direction, currentSlideItem, previousSlideItem) {
|
|
7915
|
-
var
|
|
7942
|
+
var _this14 = this;
|
|
7916
7943
|
|
|
7917
7944
|
if (this.lGalleryOn) {
|
|
7918
7945
|
previousSlideItem.addClass('lg-slide-progress');
|
|
@@ -7920,9 +7947,9 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7920
7947
|
|
|
7921
7948
|
setTimeout(function () {
|
|
7922
7949
|
// remove all transitions
|
|
7923
|
-
|
|
7950
|
+
_this14.outer.addClass('lg-no-trans');
|
|
7924
7951
|
|
|
7925
|
-
|
|
7952
|
+
_this14.outer.find('.lg-item').removeClass('lg-prev-slide lg-next-slide');
|
|
7926
7953
|
|
|
7927
7954
|
if (direction === 'prev') {
|
|
7928
7955
|
//prevslide
|
|
@@ -7936,11 +7963,11 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7936
7963
|
|
|
7937
7964
|
|
|
7938
7965
|
setTimeout(function () {
|
|
7939
|
-
|
|
7966
|
+
_this14.outer.find('.lg-item').removeClass('lg-current');
|
|
7940
7967
|
|
|
7941
7968
|
currentSlideItem.addClass('lg-current'); // reset all transitions
|
|
7942
7969
|
|
|
7943
|
-
|
|
7970
|
+
_this14.outer.removeClass('lg-no-trans');
|
|
7944
7971
|
}, 50);
|
|
7945
7972
|
}, this.lGalleryOn ? this.settings.slideDelay : 0);
|
|
7946
7973
|
}
|
|
@@ -7961,7 +7988,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
7961
7988
|
}, {
|
|
7962
7989
|
key: "slide",
|
|
7963
7990
|
value: function slide(index, fromTouch, fromThumb, direction) {
|
|
7964
|
-
var
|
|
7991
|
+
var _this15 = this;
|
|
7965
7992
|
|
|
7966
7993
|
var prevIndex = this.getPreviousSlideIndex();
|
|
7967
7994
|
this.currentItemsInDom = this.organizeSlideItems(index, prevIndex); // Prevent multiple call, Required for hsh plugin
|
|
@@ -8049,20 +8076,20 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8049
8076
|
this.loadContent(index, true);
|
|
8050
8077
|
} else {
|
|
8051
8078
|
setTimeout(function () {
|
|
8052
|
-
|
|
8079
|
+
_this15.loadContent(index, true); // Add title if this.settings.appendSubHtmlTo === lg-sub-html
|
|
8053
8080
|
|
|
8054
8081
|
|
|
8055
|
-
if (
|
|
8056
|
-
|
|
8082
|
+
if (_this15.settings.appendSubHtmlTo !== '.lg-item') {
|
|
8083
|
+
_this15.addHtml(index);
|
|
8057
8084
|
}
|
|
8058
8085
|
}, this.settings.speed + 50 + (fromTouch ? 0 : this.settings.slideDelay));
|
|
8059
8086
|
}
|
|
8060
8087
|
|
|
8061
8088
|
setTimeout(function () {
|
|
8062
|
-
|
|
8089
|
+
_this15.lgBusy = false;
|
|
8063
8090
|
previousSlideItem.removeClass('lg-slide-progress');
|
|
8064
8091
|
|
|
8065
|
-
|
|
8092
|
+
_this15.LGel.trigger(lGEvents.afterSlide, {
|
|
8066
8093
|
prevIndex: prevIndex,
|
|
8067
8094
|
index: index,
|
|
8068
8095
|
fromTouch: fromTouch,
|
|
@@ -8149,7 +8176,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8149
8176
|
}, {
|
|
8150
8177
|
key: "touchEnd",
|
|
8151
8178
|
value: function touchEnd(endCoords, startCoords, event) {
|
|
8152
|
-
var
|
|
8179
|
+
var _this16 = this;
|
|
8153
8180
|
|
|
8154
8181
|
var distance; // keep slide animation for any mode while dragg/swipe
|
|
8155
8182
|
|
|
@@ -8159,61 +8186,61 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8159
8186
|
|
|
8160
8187
|
|
|
8161
8188
|
setTimeout(function () {
|
|
8162
|
-
|
|
8189
|
+
_this16.$container.removeClass('lg-dragging-vertical');
|
|
8163
8190
|
|
|
8164
|
-
|
|
8191
|
+
_this16.outer.removeClass('lg-dragging lg-hide-items').addClass('lg-components-open');
|
|
8165
8192
|
|
|
8166
8193
|
var triggerClick = true;
|
|
8167
8194
|
|
|
8168
|
-
if (
|
|
8195
|
+
if (_this16.swipeDirection === 'horizontal') {
|
|
8169
8196
|
distance = endCoords.pageX - startCoords.pageX;
|
|
8170
8197
|
var distanceAbs = Math.abs(endCoords.pageX - startCoords.pageX);
|
|
8171
8198
|
|
|
8172
|
-
if (distance < 0 && distanceAbs >
|
|
8173
|
-
|
|
8199
|
+
if (distance < 0 && distanceAbs > _this16.settings.swipeThreshold) {
|
|
8200
|
+
_this16.goToNextSlide(true);
|
|
8174
8201
|
|
|
8175
8202
|
triggerClick = false;
|
|
8176
|
-
} else if (distance > 0 && distanceAbs >
|
|
8177
|
-
|
|
8203
|
+
} else if (distance > 0 && distanceAbs > _this16.settings.swipeThreshold) {
|
|
8204
|
+
_this16.goToPrevSlide(true);
|
|
8178
8205
|
|
|
8179
8206
|
triggerClick = false;
|
|
8180
8207
|
}
|
|
8181
|
-
} else if (
|
|
8208
|
+
} else if (_this16.swipeDirection === 'vertical') {
|
|
8182
8209
|
distance = Math.abs(endCoords.pageY - startCoords.pageY);
|
|
8183
8210
|
|
|
8184
|
-
if (
|
|
8185
|
-
|
|
8211
|
+
if (_this16.settings.closable && _this16.settings.swipeToClose && distance > 100) {
|
|
8212
|
+
_this16.closeGallery();
|
|
8186
8213
|
|
|
8187
8214
|
return;
|
|
8188
8215
|
} else {
|
|
8189
|
-
|
|
8216
|
+
_this16.$backdrop.css('opacity', 1);
|
|
8190
8217
|
}
|
|
8191
8218
|
}
|
|
8192
8219
|
|
|
8193
|
-
|
|
8220
|
+
_this16.outer.find('.lg-item').removeAttr('style');
|
|
8194
8221
|
|
|
8195
8222
|
if (triggerClick && Math.abs(endCoords.pageX - startCoords.pageX) < 5) {
|
|
8196
8223
|
// Trigger click if distance is less than 5 pix
|
|
8197
8224
|
var target = $LG(event.target);
|
|
8198
8225
|
|
|
8199
|
-
if (
|
|
8200
|
-
|
|
8226
|
+
if (_this16.isPosterElement(target)) {
|
|
8227
|
+
_this16.LGel.trigger(lGEvents.posterClick);
|
|
8201
8228
|
}
|
|
8202
8229
|
}
|
|
8203
8230
|
|
|
8204
|
-
|
|
8231
|
+
_this16.swipeDirection = undefined;
|
|
8205
8232
|
}); // remove slide class once drag/swipe is completed if mode is not slide
|
|
8206
8233
|
|
|
8207
8234
|
setTimeout(function () {
|
|
8208
|
-
if (!
|
|
8209
|
-
|
|
8235
|
+
if (!_this16.outer.hasClass('lg-dragging') && _this16.settings.mode !== 'lg-slide') {
|
|
8236
|
+
_this16.outer.removeClass('lg-slide');
|
|
8210
8237
|
}
|
|
8211
8238
|
}, this.settings.speed + 100);
|
|
8212
8239
|
}
|
|
8213
8240
|
}, {
|
|
8214
8241
|
key: "enableSwipe",
|
|
8215
8242
|
value: function enableSwipe() {
|
|
8216
|
-
var
|
|
8243
|
+
var _this17 = this;
|
|
8217
8244
|
|
|
8218
8245
|
var startCoords = {};
|
|
8219
8246
|
var endCoords = {};
|
|
@@ -8222,15 +8249,15 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8222
8249
|
|
|
8223
8250
|
if (this.settings.enableSwipe) {
|
|
8224
8251
|
this.$inner.on('touchstart.lg', function (e) {
|
|
8225
|
-
|
|
8252
|
+
_this17.dragOrSwipeEnabled = true;
|
|
8226
8253
|
|
|
8227
|
-
var $item =
|
|
8254
|
+
var $item = _this17.getSlideItem(_this17.index);
|
|
8228
8255
|
|
|
8229
|
-
if (($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) && !
|
|
8256
|
+
if (($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) && !_this17.outer.hasClass('lg-zoomed') && !_this17.lgBusy && e.targetTouches.length === 1) {
|
|
8230
8257
|
isSwiping = true;
|
|
8231
|
-
|
|
8258
|
+
_this17.touchAction = 'swipe';
|
|
8232
8259
|
|
|
8233
|
-
|
|
8260
|
+
_this17.manageSwipeClass();
|
|
8234
8261
|
|
|
8235
8262
|
startCoords = {
|
|
8236
8263
|
pageX: e.targetTouches[0].pageX,
|
|
@@ -8239,32 +8266,32 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8239
8266
|
}
|
|
8240
8267
|
});
|
|
8241
8268
|
this.$inner.on('touchmove.lg', function (e) {
|
|
8242
|
-
if (isSwiping &&
|
|
8269
|
+
if (isSwiping && _this17.touchAction === 'swipe' && e.targetTouches.length === 1) {
|
|
8243
8270
|
endCoords = {
|
|
8244
8271
|
pageX: e.targetTouches[0].pageX,
|
|
8245
8272
|
pageY: e.targetTouches[0].pageY
|
|
8246
8273
|
};
|
|
8247
8274
|
|
|
8248
|
-
|
|
8275
|
+
_this17.touchMove(startCoords, endCoords, e);
|
|
8249
8276
|
|
|
8250
8277
|
isMoved = true;
|
|
8251
8278
|
}
|
|
8252
8279
|
});
|
|
8253
8280
|
this.$inner.on('touchend.lg', function (event) {
|
|
8254
|
-
if (
|
|
8281
|
+
if (_this17.touchAction === 'swipe') {
|
|
8255
8282
|
if (isMoved) {
|
|
8256
8283
|
isMoved = false;
|
|
8257
8284
|
|
|
8258
|
-
|
|
8285
|
+
_this17.touchEnd(endCoords, startCoords, event);
|
|
8259
8286
|
} else if (isSwiping) {
|
|
8260
8287
|
var target = $LG(event.target);
|
|
8261
8288
|
|
|
8262
|
-
if (
|
|
8263
|
-
|
|
8289
|
+
if (_this17.isPosterElement(target)) {
|
|
8290
|
+
_this17.LGel.trigger(lGEvents.posterClick);
|
|
8264
8291
|
}
|
|
8265
8292
|
}
|
|
8266
8293
|
|
|
8267
|
-
|
|
8294
|
+
_this17.touchAction = undefined;
|
|
8268
8295
|
isSwiping = false;
|
|
8269
8296
|
}
|
|
8270
8297
|
});
|
|
@@ -8273,7 +8300,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8273
8300
|
}, {
|
|
8274
8301
|
key: "enableDrag",
|
|
8275
8302
|
value: function enableDrag() {
|
|
8276
|
-
var
|
|
8303
|
+
var _this18 = this;
|
|
8277
8304
|
|
|
8278
8305
|
var startCoords = {};
|
|
8279
8306
|
var endCoords = {};
|
|
@@ -8282,16 +8309,16 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8282
8309
|
|
|
8283
8310
|
if (this.settings.enableDrag) {
|
|
8284
8311
|
this.outer.on('mousedown.lg', function (e) {
|
|
8285
|
-
|
|
8312
|
+
_this18.dragOrSwipeEnabled = true;
|
|
8286
8313
|
|
|
8287
|
-
var $item =
|
|
8314
|
+
var $item = _this18.getSlideItem(_this18.index);
|
|
8288
8315
|
|
|
8289
8316
|
if ($LG(e.target).hasClass('lg-item') || $item.get().contains(e.target)) {
|
|
8290
|
-
if (!
|
|
8317
|
+
if (!_this18.outer.hasClass('lg-zoomed') && !_this18.lgBusy) {
|
|
8291
8318
|
e.preventDefault();
|
|
8292
8319
|
|
|
8293
|
-
if (!
|
|
8294
|
-
|
|
8320
|
+
if (!_this18.lgBusy) {
|
|
8321
|
+
_this18.manageSwipeClass();
|
|
8295
8322
|
|
|
8296
8323
|
startCoords = {
|
|
8297
8324
|
pageX: e.pageX,
|
|
@@ -8299,31 +8326,31 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8299
8326
|
};
|
|
8300
8327
|
isDraging = true; // ** Fix for webkit cursor issue https://code.google.com/p/chromium/issues/detail?id=26723
|
|
8301
8328
|
|
|
8302
|
-
|
|
8303
|
-
|
|
8329
|
+
_this18.outer.get().scrollLeft += 1;
|
|
8330
|
+
_this18.outer.get().scrollLeft -= 1; // *
|
|
8304
8331
|
|
|
8305
|
-
|
|
8332
|
+
_this18.outer.removeClass('lg-grab').addClass('lg-grabbing');
|
|
8306
8333
|
|
|
8307
|
-
|
|
8334
|
+
_this18.LGel.trigger(lGEvents.dragStart);
|
|
8308
8335
|
}
|
|
8309
8336
|
}
|
|
8310
8337
|
}
|
|
8311
8338
|
});
|
|
8312
8339
|
$LG(window).on("mousemove.lg.global".concat(this.lgId), function (e) {
|
|
8313
|
-
if (isDraging &&
|
|
8340
|
+
if (isDraging && _this18.lgOpened) {
|
|
8314
8341
|
isMoved = true;
|
|
8315
8342
|
endCoords = {
|
|
8316
8343
|
pageX: e.pageX,
|
|
8317
8344
|
pageY: e.pageY
|
|
8318
8345
|
};
|
|
8319
8346
|
|
|
8320
|
-
|
|
8347
|
+
_this18.touchMove(startCoords, endCoords);
|
|
8321
8348
|
|
|
8322
|
-
|
|
8349
|
+
_this18.LGel.trigger(lGEvents.dragMove);
|
|
8323
8350
|
}
|
|
8324
8351
|
});
|
|
8325
8352
|
$LG(window).on("mouseup.lg.global".concat(this.lgId), function (event) {
|
|
8326
|
-
if (!
|
|
8353
|
+
if (!_this18.lgOpened) {
|
|
8327
8354
|
return;
|
|
8328
8355
|
}
|
|
8329
8356
|
|
|
@@ -8332,18 +8359,18 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8332
8359
|
if (isMoved) {
|
|
8333
8360
|
isMoved = false;
|
|
8334
8361
|
|
|
8335
|
-
|
|
8362
|
+
_this18.touchEnd(endCoords, startCoords, event);
|
|
8336
8363
|
|
|
8337
|
-
|
|
8338
|
-
} else if (
|
|
8339
|
-
|
|
8364
|
+
_this18.LGel.trigger(lGEvents.dragEnd);
|
|
8365
|
+
} else if (_this18.isPosterElement(target)) {
|
|
8366
|
+
_this18.LGel.trigger(lGEvents.posterClick);
|
|
8340
8367
|
} // Prevent execution on click
|
|
8341
8368
|
|
|
8342
8369
|
|
|
8343
8370
|
if (isDraging) {
|
|
8344
8371
|
isDraging = false;
|
|
8345
8372
|
|
|
8346
|
-
|
|
8373
|
+
_this18.outer.removeClass('lg-grabbing').addClass('lg-grab');
|
|
8347
8374
|
}
|
|
8348
8375
|
});
|
|
8349
8376
|
}
|
|
@@ -8351,11 +8378,11 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8351
8378
|
}, {
|
|
8352
8379
|
key: "triggerPosterClick",
|
|
8353
8380
|
value: function triggerPosterClick() {
|
|
8354
|
-
var
|
|
8381
|
+
var _this19 = this;
|
|
8355
8382
|
|
|
8356
8383
|
this.$inner.on('click.lg', function (event) {
|
|
8357
|
-
if (!
|
|
8358
|
-
|
|
8384
|
+
if (!_this19.dragOrSwipeEnabled && _this19.isPosterElement($LG(event.target))) {
|
|
8385
|
+
_this19.LGel.trigger(lGEvents.posterClick);
|
|
8359
8386
|
}
|
|
8360
8387
|
});
|
|
8361
8388
|
}
|
|
@@ -8395,7 +8422,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8395
8422
|
}, {
|
|
8396
8423
|
key: "goToNextSlide",
|
|
8397
8424
|
value: function goToNextSlide(fromTouch) {
|
|
8398
|
-
var
|
|
8425
|
+
var _this20 = this;
|
|
8399
8426
|
|
|
8400
8427
|
var _loop = this.settings.loop;
|
|
8401
8428
|
|
|
@@ -8420,7 +8447,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8420
8447
|
} else if (this.settings.slideEndAnimation && !fromTouch) {
|
|
8421
8448
|
this.outer.addClass('lg-right-end');
|
|
8422
8449
|
setTimeout(function () {
|
|
8423
|
-
|
|
8450
|
+
_this20.outer.removeClass('lg-right-end');
|
|
8424
8451
|
}, 400);
|
|
8425
8452
|
}
|
|
8426
8453
|
}
|
|
@@ -8440,7 +8467,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8440
8467
|
}, {
|
|
8441
8468
|
key: "goToPrevSlide",
|
|
8442
8469
|
value: function goToPrevSlide(fromTouch) {
|
|
8443
|
-
var
|
|
8470
|
+
var _this21 = this;
|
|
8444
8471
|
|
|
8445
8472
|
var _loop = this.settings.loop;
|
|
8446
8473
|
|
|
@@ -8467,7 +8494,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8467
8494
|
} else if (this.settings.slideEndAnimation && !fromTouch) {
|
|
8468
8495
|
this.outer.addClass('lg-left-end');
|
|
8469
8496
|
setTimeout(function () {
|
|
8470
|
-
|
|
8497
|
+
_this21.outer.removeClass('lg-left-end');
|
|
8471
8498
|
}, 400);
|
|
8472
8499
|
}
|
|
8473
8500
|
}
|
|
@@ -8476,30 +8503,30 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8476
8503
|
}, {
|
|
8477
8504
|
key: "keyPress",
|
|
8478
8505
|
value: function keyPress() {
|
|
8479
|
-
var
|
|
8506
|
+
var _this22 = this;
|
|
8480
8507
|
|
|
8481
8508
|
$LG(window).on("keydown.lg.global".concat(this.lgId), function (e) {
|
|
8482
|
-
if (
|
|
8509
|
+
if (_this22.lgOpened && _this22.settings.escKey === true && e.keyCode === 27) {
|
|
8483
8510
|
e.preventDefault();
|
|
8484
8511
|
|
|
8485
|
-
if (
|
|
8486
|
-
|
|
8512
|
+
if (_this22.settings.allowMediaOverlap && _this22.outer.hasClass('lg-can-toggle') && _this22.outer.hasClass('lg-components-open')) {
|
|
8513
|
+
_this22.outer.removeClass('lg-components-open');
|
|
8487
8514
|
} else {
|
|
8488
|
-
|
|
8515
|
+
_this22.closeGallery();
|
|
8489
8516
|
}
|
|
8490
8517
|
}
|
|
8491
8518
|
|
|
8492
|
-
if (
|
|
8519
|
+
if (_this22.lgOpened && _this22.galleryItems.length > 1) {
|
|
8493
8520
|
if (e.keyCode === 37) {
|
|
8494
8521
|
e.preventDefault();
|
|
8495
8522
|
|
|
8496
|
-
|
|
8523
|
+
_this22.goToPrevSlide();
|
|
8497
8524
|
}
|
|
8498
8525
|
|
|
8499
8526
|
if (e.keyCode === 39) {
|
|
8500
8527
|
e.preventDefault();
|
|
8501
8528
|
|
|
8502
|
-
|
|
8529
|
+
_this22.goToNextSlide();
|
|
8503
8530
|
}
|
|
8504
8531
|
}
|
|
8505
8532
|
});
|
|
@@ -8507,13 +8534,13 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8507
8534
|
}, {
|
|
8508
8535
|
key: "arrow",
|
|
8509
8536
|
value: function arrow() {
|
|
8510
|
-
var
|
|
8537
|
+
var _this23 = this;
|
|
8511
8538
|
|
|
8512
8539
|
this.getElementById('lg-prev').on('click.lg', function () {
|
|
8513
|
-
|
|
8540
|
+
_this23.goToPrevSlide();
|
|
8514
8541
|
});
|
|
8515
8542
|
this.getElementById('lg-next').on('click.lg', function () {
|
|
8516
|
-
|
|
8543
|
+
_this23.goToNextSlide();
|
|
8517
8544
|
});
|
|
8518
8545
|
}
|
|
8519
8546
|
}, {
|
|
@@ -8547,20 +8574,28 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8547
8574
|
}, {
|
|
8548
8575
|
key: "mousewheel",
|
|
8549
8576
|
value: function mousewheel() {
|
|
8550
|
-
var
|
|
8577
|
+
var _this24 = this;
|
|
8551
8578
|
|
|
8552
|
-
|
|
8553
|
-
|
|
8579
|
+
var lastCall = 0;
|
|
8580
|
+
this.outer.on('wheel.lg', function (e) {
|
|
8581
|
+
if (!e.deltaY || _this24.galleryItems.length < 2) {
|
|
8554
8582
|
return;
|
|
8555
8583
|
}
|
|
8556
8584
|
|
|
8557
|
-
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8585
|
+
e.preventDefault();
|
|
8586
|
+
var now = new Date().getTime();
|
|
8587
|
+
|
|
8588
|
+
if (now - lastCall < 1000) {
|
|
8589
|
+
return;
|
|
8561
8590
|
}
|
|
8562
8591
|
|
|
8563
|
-
|
|
8592
|
+
lastCall = now;
|
|
8593
|
+
|
|
8594
|
+
if (e.deltaY > 0) {
|
|
8595
|
+
_this24.goToNextSlide();
|
|
8596
|
+
} else if (e.deltaY < 0) {
|
|
8597
|
+
_this24.goToPrevSlide();
|
|
8598
|
+
}
|
|
8564
8599
|
});
|
|
8565
8600
|
}
|
|
8566
8601
|
}, {
|
|
@@ -8582,12 +8617,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8582
8617
|
}, {
|
|
8583
8618
|
key: "toggleMaximize",
|
|
8584
8619
|
value: function toggleMaximize() {
|
|
8585
|
-
var
|
|
8620
|
+
var _this25 = this;
|
|
8586
8621
|
|
|
8587
8622
|
this.getElementById('lg-maximize').on('click.lg', function () {
|
|
8588
|
-
|
|
8623
|
+
_this25.$container.toggleClass('lg-inline');
|
|
8589
8624
|
|
|
8590
|
-
|
|
8625
|
+
_this25.refreshOnResize();
|
|
8591
8626
|
});
|
|
8592
8627
|
}
|
|
8593
8628
|
}, {
|
|
@@ -8602,12 +8637,12 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8602
8637
|
}, {
|
|
8603
8638
|
key: "manageCloseGallery",
|
|
8604
8639
|
value: function manageCloseGallery() {
|
|
8605
|
-
var
|
|
8640
|
+
var _this26 = this;
|
|
8606
8641
|
|
|
8607
8642
|
if (!this.settings.closable) return;
|
|
8608
8643
|
var mousedown = false;
|
|
8609
8644
|
this.getElementById('lg-close').on('click.lg', function () {
|
|
8610
|
-
|
|
8645
|
+
_this26.closeGallery();
|
|
8611
8646
|
});
|
|
8612
8647
|
|
|
8613
8648
|
if (this.settings.closeOnTap) {
|
|
@@ -8616,7 +8651,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8616
8651
|
this.outer.on('mousedown.lg', function (e) {
|
|
8617
8652
|
var target = $LG(e.target);
|
|
8618
8653
|
|
|
8619
|
-
if (
|
|
8654
|
+
if (_this26.isSlideElement(target)) {
|
|
8620
8655
|
mousedown = true;
|
|
8621
8656
|
} else {
|
|
8622
8657
|
mousedown = false;
|
|
@@ -8628,9 +8663,9 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8628
8663
|
this.outer.on('mouseup.lg', function (e) {
|
|
8629
8664
|
var target = $LG(e.target);
|
|
8630
8665
|
|
|
8631
|
-
if (
|
|
8632
|
-
if (!
|
|
8633
|
-
|
|
8666
|
+
if (_this26.isSlideElement(target) && mousedown) {
|
|
8667
|
+
if (!_this26.outer.hasClass('lg-dragging')) {
|
|
8668
|
+
_this26.closeGallery();
|
|
8634
8669
|
}
|
|
8635
8670
|
}
|
|
8636
8671
|
});
|
|
@@ -8651,7 +8686,7 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8651
8686
|
}, {
|
|
8652
8687
|
key: "closeGallery",
|
|
8653
8688
|
value: function closeGallery(force) {
|
|
8654
|
-
var
|
|
8689
|
+
var _this27 = this;
|
|
8655
8690
|
|
|
8656
8691
|
if (!this.lgOpened || !this.settings.closable && !force) {
|
|
8657
8692
|
return 0;
|
|
@@ -8700,32 +8735,32 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8700
8735
|
this.$container.removeClass('lg-show-in'); // Once the closign animation is completed and gallery is invisible
|
|
8701
8736
|
|
|
8702
8737
|
setTimeout(function () {
|
|
8703
|
-
if (
|
|
8704
|
-
|
|
8738
|
+
if (_this27.zoomFromOrigin && transform) {
|
|
8739
|
+
_this27.outer.removeClass('lg-zoom-from-image');
|
|
8705
8740
|
}
|
|
8706
8741
|
|
|
8707
|
-
|
|
8742
|
+
_this27.$container.removeClass('lg-show'); // Need to remove inline opacity as it is used in the stylesheet as well
|
|
8708
8743
|
|
|
8709
8744
|
|
|
8710
|
-
|
|
8745
|
+
_this27.$backdrop.removeAttr('style').css('transition-duration', _this27.settings.backdropDuration + 'ms');
|
|
8711
8746
|
|
|
8712
|
-
|
|
8747
|
+
_this27.outer.removeClass("lg-closing ".concat(_this27.settings.startClass));
|
|
8713
8748
|
|
|
8714
|
-
|
|
8749
|
+
_this27.getSlideItem(_this27.index).removeClass('lg-start-end-progress');
|
|
8715
8750
|
|
|
8716
|
-
|
|
8751
|
+
_this27.$inner.empty();
|
|
8717
8752
|
|
|
8718
|
-
if (
|
|
8719
|
-
|
|
8720
|
-
instance:
|
|
8753
|
+
if (_this27.lgOpened) {
|
|
8754
|
+
_this27.LGel.trigger(lGEvents.afterClose, {
|
|
8755
|
+
instance: _this27
|
|
8721
8756
|
});
|
|
8722
8757
|
}
|
|
8723
8758
|
|
|
8724
|
-
if (
|
|
8725
|
-
|
|
8759
|
+
if (_this27.outer.get()) {
|
|
8760
|
+
_this27.outer.get().blur();
|
|
8726
8761
|
}
|
|
8727
8762
|
|
|
8728
|
-
|
|
8763
|
+
_this27.lgOpened = false;
|
|
8729
8764
|
}, removeTimeout + 100);
|
|
8730
8765
|
return removeTimeout + 100;
|
|
8731
8766
|
}
|
|
@@ -8811,21 +8846,21 @@ var lightgallery_LightGallery = /*#__PURE__*/function () {
|
|
|
8811
8846
|
}, {
|
|
8812
8847
|
key: "destroy",
|
|
8813
8848
|
value: function destroy() {
|
|
8814
|
-
var
|
|
8849
|
+
var _this28 = this;
|
|
8815
8850
|
|
|
8816
8851
|
var closeTimeout = this.closeGallery(true);
|
|
8817
8852
|
setTimeout(function () {
|
|
8818
|
-
|
|
8853
|
+
_this28.destroyModules(true);
|
|
8819
8854
|
|
|
8820
|
-
if (!
|
|
8821
|
-
|
|
8855
|
+
if (!_this28.settings.dynamic) {
|
|
8856
|
+
_this28.invalidateItems();
|
|
8822
8857
|
}
|
|
8823
8858
|
|
|
8824
|
-
$LG(window).off(".lg.global".concat(
|
|
8859
|
+
$LG(window).off(".lg.global".concat(_this28.lgId));
|
|
8825
8860
|
|
|
8826
|
-
|
|
8861
|
+
_this28.LGel.off('.lg');
|
|
8827
8862
|
|
|
8828
|
-
|
|
8863
|
+
_this28.$container.remove();
|
|
8829
8864
|
}, closeTimeout);
|
|
8830
8865
|
return closeTimeout;
|
|
8831
8866
|
}
|
|
@@ -8965,6 +9000,18 @@ LightGalleryvue_type_script_lang_ts_Lightgallery = __decorate([Options({
|
|
|
8965
9000
|
},
|
|
8966
9001
|
onAfterClose: {
|
|
8967
9002
|
type: Function
|
|
9003
|
+
},
|
|
9004
|
+
onRotateLeft: {
|
|
9005
|
+
type: Function
|
|
9006
|
+
},
|
|
9007
|
+
onRotateRight: {
|
|
9008
|
+
type: Function
|
|
9009
|
+
},
|
|
9010
|
+
onFlipHorizontal: {
|
|
9011
|
+
type: Function
|
|
9012
|
+
},
|
|
9013
|
+
onFlipVertical: {
|
|
9014
|
+
type: Function
|
|
8968
9015
|
}
|
|
8969
9016
|
}
|
|
8970
9017
|
})], LightGalleryvue_type_script_lang_ts_Lightgallery);
|