| Current Path : /home/antonen/poznajlitwe.lt/media/n2/ss3/plugins/widgetfullscreen/image/image/ |
| Current File : /home/antonen/poznajlitwe.lt/media/n2/ss3/plugins/widgetfullscreen/image/image/fullscreen.min.js |
N2D("SmartSliderWidgetFullScreenImage",function(t,e){function i(e,i,s,o){this.slider=e,this.slider.started(t.proxy(this.start,this,i,s,o))}return i.prototype.start=function(e,i,s){return this.slider.sliderElement.data("fullscreen")?!1:(this.responsive=this.slider.responsive,this.slider.sliderElement.data("fullscreen",this).on({n2FullScreen:t.proxy(function(){this.button.addClass("n2-active")},this),n2ExitFullScreen:t.proxy(function(){this.button.removeClass("n2-active")},this)}),this.button=this.slider.sliderElement.find(".n2-full-screen-widget"),this.deferred=t.Deferred(),this.slider.sliderElement.on("SliderDevice",t.proxy(this.onDevice,this)).trigger("addWidget",this.deferred),this.button.on("click",t.proxy(this.slider.controlFullscreen.switchState,this.slider.controlFullscreen)),this.desktopRatio=e,this.tabletRatio=i,this.mobileRatio=s,void this.button.n2imagesLoaded().always(t.proxy(this.loaded,this)))},i.prototype.loaded=function(){this.button.css("display","inline-block"),this.width=this.button.width(),this.height=this.button.height(),this.button.css("display",""),this.onDevice(null,{device:this.responsive.getDeviceMode()}),this.deferred.resolve()},i.prototype.onDevice=function(t,e){var i=1;switch(e.device){case"tablet":i=this.tabletRatio;break;case"mobile":i=this.mobileRatio;break;default:i=this.desktopRatio}this.button.width(this.width*i),this.button.height(this.height*i)},i.prototype.destroy=function(){this.button.remove()},i});