Lines Matching refs:_this

65         var _this = this;
68 if (_this.core.s.actualSize) {
72 if (_this.core.s.useLeftForZoom) {
73 _this.core.$outer.addClass('lg-use-left-for-zoom');
75 _this.core.$outer.addClass('lg-use-transition-for-zoom');
81 _this.core.$el.on('onSlideItemLoad.lg.tm.zoom', function(event, index, delay) {
84 var _speed = _this.core.s.enableZoomAfter + delay;
97 _this.zoomabletimeout = setTimeout(function() {
98 _this.core.$slide.eq(index).addClass('lg-zoomable');
111 var $image = _this.core.$outer.find('.lg-current .lg-image');
119 _x = _this.pageX - offsetX;
120 _y = _this.pageY - offsetY;
127 if (_this.core.s.useLeftForZoom) {
139 _this.core.$outer.addClass('lg-zoomed');
141 _this.resetZoom();
154 if (_this.core.s.dynamic) {
155 nw = _this.core.s.dynamicEl[index].width || $image[0].naturalWidth || w;
157 nw = _this.core.$items.eq(index).attr('data-width') || $image[0].naturalWidth || w;
162 if (_this.core.$outer.hasClass('lg-zoomed')) {
172 _this.pageX = $(window).width() / 2;
173 _this.pageY = ($(window).height() / 2) + $(window).scrollTop();
175 _this.pageX = event.pageX || event.originalEvent.targetTouches[0].pageX;
176 _this.pageY = event.pageY || event.originalEvent.targetTouches[0].pageY;
181 _this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
188 _this.core.$el.on('onAferAppendSlide.lg.tm.zoom', function(event, index) {
191 var $image = _this.core.$slide.eq(index).find('.lg-image');
215 _this.pageX = $(window).width() / 2;
216 _this.pageY = ($(window).height() / 2) + $(window).scrollTop();
221 if (_this.core.$outer.find('.lg-current .lg-image').length) {
222 scale -= _this.core.s.scale;
228 if (_this.core.$outer.find('.lg-current .lg-image').length) {
229 scale += _this.core.s.scale;
235 …actualSize(event, _this.core.$slide.eq(_this.core.index).find('.lg-image'), _this.core.index, true…
239 _this.core.$el.on('onBeforeSlide.lg.tm', function() {
241 _this.resetZoom();
245 if (!_this.core.isTouch) {
246 _this.zoomDrag();
249 if (_this.core.isTouch) {
250 _this.zoomSwipe();
267 var _this = this;
278 _this.core.$slide.on('touchstart.lg', function(e) {
280 if (_this.core.$outer.hasClass('lg-zoomed')) {
281 var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
283 …allowY = $image.prop('offsetHeight') * $image.attr('data-scale') > _this.core.$outer.find('.lg').h…
284 …allowX = $image.prop('offsetWidth') * $image.attr('data-scale') > _this.core.$outer.find('.lg').wi…
296 _this.core.$slide.on('touchmove.lg', function(e) {
298 if (_this.core.$outer.hasClass('lg-zoomed')) {
300 var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
313 _this.core.$outer.addClass('lg-zoom-dragging');
329 if (_this.core.s.useLeftForZoom) {
343 _this.core.$slide.on('touchend.lg', function() {
344 if (_this.core.$outer.hasClass('lg-zoomed')) {
347 _this.core.$outer.removeClass('lg-zoom-dragging');
348 _this.touchendZoom(startCoords, endCoords, allowX, allowY);
358 var _this = this;
370 _this.core.$slide.on('mousedown.lg.zoom', function(e) {
373 var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
375 …allowY = $image.prop('offsetHeight') * $image.attr('data-scale') > _this.core.$outer.find('.lg').h…
376 …allowX = $image.prop('offsetWidth') * $image.attr('data-scale') > _this.core.$outer.find('.lg').wi…
378 if (_this.core.$outer.hasClass('lg-zoomed')) {
389 _this.core.$outer.scrollLeft += 1;
390 _this.core.$outer.scrollLeft -= 1;
392 _this.core.$outer.removeClass('lg-grab').addClass('lg-grabbing');
399 var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
410 _this.core.$outer.addClass('lg-zoom-dragging');
424 if (_this.core.s.useLeftForZoom) {
439 _this.core.$outer.removeClass('lg-zoom-dragging');
447 _this.touchendZoom(startCoords, endCoords, allowX, allowY);
454 _this.core.$outer.removeClass('lg-grabbing').addClass('lg-grab');
461 var _this = this;
462 var _$el = _this.core.$slide.eq(_this.core.index).find('.lg-img-wrap');
463 var $image = _this.core.$slide.eq(_this.core.index).find('.lg-object');
466 var minY = (_this.core.$outer.find('.lg').height() - $image.prop('offsetHeight')) / 2;
467 …abs(($image.prop('offsetHeight') * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('…
468 var minX = (_this.core.$outer.find('.lg').width() - $image.prop('offsetWidth')) / 2;
469 ….abs(($image.prop('offsetWidth') * Math.abs($image.attr('data-scale'))) - _this.core.$outer.find('…
500 if (_this.core.s.useLeftForZoom) {
514 var _this = this;
517 _this.core.$el.off('.lg.zoom');
519 _this.core.$slide.off('.lg.zoom');
520 _this.core.$el.off('.lg.tm.zoom');
521 _this.resetZoom();
522 clearTimeout(_this.zoomabletimeout);
523 _this.zoomabletimeout = false;