Lines Matching refs:core

56         this.core = $(element).data('lightGallery');
59 this.core.s = $.extend({}, defaults, this.core.s);
64 …this.thumbTotalWidth = (this.core.$items.length * (this.core.s.thumbWidth + this.core.s.thumbMargi…
65 this.thumbIndex = this.core.index;
77 if (this.core.s.thumbnail && this.core.$items.length > 1) {
78 if (this.core.s.showThumbByDefault) {
80 _this.core.$outer.addClass('lg-thumb-open');
84 if (this.core.s.pullCaptionUp) {
85 this.core.$outer.addClass('lg-pull-caption-up');
89 if (this.core.s.animateThumb) {
90 if (this.core.s.enableThumbDrag && !this.core.isTouch && this.core.doCss()) {
94 if (this.core.s.enableThumbSwipe && this.core.isTouch && this.core.doCss()) {
118 switch (this.core.s.vimeoThumbSize) {
129 _this.core.$outer.addClass('lg-has-thumb');
131 _this.core.$outer.find('.lg').append(html);
133 _this.$thumbOuter = _this.core.$outer.find('.lg-thumb-outer');
136 if (_this.core.s.animateThumb) {
137 _this.core.$outer.find('.lg-thumb').css({
143 if (this.core.s.animateThumb) {
144 _this.$thumbOuter.css('height', _this.core.s.thumbContHeight + 'px');
148 var isVideo = _this.core.isVideo(src, index) || {};
154 if (_this.core.s.loadYoutubeThumbnail) {
155 …thumbImg = '//img.youtube.com/vi/' + isVideo.youtube[1] + '/' + _this.core.s.youtubeThumbSize + '.…
160 if (_this.core.s.loadVimeoThumbnail) {
167 if (_this.core.s.loadDailymotionThumbnail) {
177 …+ '" class="lg-thumb-item" style="width:' + _this.core.s.thumbWidth + 'px; margin-right: ' + _this…
181 if (_this.core.s.dynamic) {
182 for (var i = 0; i < _this.core.s.dynamicEl.length; i++) {
183 getThumb(_this.core.s.dynamicEl[i].src, _this.core.s.dynamicEl[i].thumb, i);
186 _this.core.$items.each(function(i) {
188 if (!_this.core.s.exThumbImage) {
191 …humb($(this).attr('href') || $(this).attr('data-src'), $(this).attr(_this.core.s.exThumbImage), i);
197 _this.core.$outer.find('.lg-thumb').html(thumbList);
199 $thumb = _this.core.$outer.find('.lg-thumb-item');
210 $this.find('img').attr('src', data[0][_this.core.s.vimeoThumbSize]);
216 $thumb.eq(_this.core.index).addClass('active');
217 _this.core.$el.on('onBeforeSlide.lg.tm', function() {
219 $thumb.eq(_this.core.index).addClass('active');
228 if ((_this.thumbClickable && !_this.core.lgBusy) || !_this.core.doCss()) {
229 _this.core.index = _$this.index();
230 _this.core.slide(_this.core.index, false, true, false);
235 _this.core.$el.on('onBeforeSlide.lg.tm', function() {
236 _this.animateThumb(_this.core.index);
241 _this.animateThumb(_this.core.index);
250 this.core.$outer.find('.lg-thumb').css({
256 var $thumb = this.core.$outer.find('.lg-thumb');
257 if (this.core.s.animateThumb) {
259 switch (this.core.s.currentPagerPosition) {
264 position = (this.thumbOuterWidth / 2) - (this.core.s.thumbWidth / 2);
267 position = this.thumbOuterWidth - this.core.s.thumbWidth;
269 this.left = ((this.core.s.thumbWidth + this.core.s.thumbMargin) * index - 1) - position;
278 if (this.core.lGalleryOn) {
280 … this.core.$outer.find('.lg-thumb').css('transition-duration', this.core.s.speed + 'ms');
283 if (!this.core.doCss()) {
286 }, this.core.s.speed);
289 if (!this.core.doCss()) {
311 _this.core.$outer.find('.lg-thumb').on('mousedown.lg.thumb', function(e) {
319 _this.core.$outer.scrollLeft += 1;
320 _this.core.$outer.scrollLeft -= 1;
359 if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
382 _this.core.$outer.find('.lg-thumb').on('touchstart.lg', function(e) {
390 _this.core.$outer.find('.lg-thumb').on('touchmove.lg', function(e) {
416 _this.core.$outer.find('.lg-thumb').on('touchend.lg', function() {
422 if (Math.abs(endCoords - startCoords) < _this.core.s.swipeThreshold) {
439 if (_this.core.s.toogleThumb) {
440 _this.core.$outer.addClass('lg-can-toggle');
442 _this.core.$outer.find('.lg-toogle-thumb').on('click.lg', function() {
443 _this.core.$outer.toggleClass('lg-thumb-open');
453 _this.core.$outer.addClass('lg-thumb-open');
456 _this.core.$outer.removeClass('lg-thumb-open');
462 if (this.core.s.thumbnail && this.core.$items.length > 1) {
465 this.core.$outer.removeClass('lg-has-thumb');