mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
2 lines
No EOL
2.1 KiB
JavaScript
2 lines
No EOL
2.1 KiB
JavaScript
!function(a){var b=xe.createPlugin("slideShow",{_holders:{},_thumbs:{},_current:{},init:function(){this._holders={},this._thumbs={},this._current={}},API_SHOW_SLIDE:function(b,c){var d,e,f,g,h,i,j=this,k=c[0],l="@"+k;if(d=this.cast("GET_IMAGES",[k]),d.length){for(var h=0,m=d.length;m>h;h++)if(!d[h].loaded)return void setTimeout(function(){j.cast("SHOW_SLIDE",c)},200);for(e=a("#zone_slide_gallery_"+k),g=e.find(".slide_gallery_placeholder").css("overflow","hidden"),e.find(".slide_gallery_loading_text").remove(),f=e.find(".slide_gallery_thumbnail_image_box").show(),h=0,i=d.length;i>h;h++)d[h].$obj.clone().css({cursor:"pointer",width:"60px",height:"60px",margin:"5px",opacity:.5}).click({idx:h},function(a){j.cast("SET_SLIDE",[k,a.data.idx])}).appendTo(f);a("#zone_gallery_navigator_status_"+k).click(function(){f.toggle()}),e.find(".__prev").click(function(){return j.cast("PREV_SLIDE",[k]),!1}).end().find(".__next").click(function(){return j.cast("NEXT_SLIDE",[k]),!1}),this._holders[l]=g,this._thumbs[l]=f,this._current[l]=0,this.cast("SET_SLIDE",[k,0])}},_showSideSlide:function(a,b){var c,d,e;c=this.cast("GET_IMAGES",[a]),c.length&&(d=this._current["@"+a],e=d+b,0>e?e=c.length-1:e>=c.length&&(e=0),this.cast("SET_SLIDE",[a,e]))},API_NEXT_SLIDE:function(a,b){this._showSideSlide(b[0],1)},API_PREV_SLIDE:function(a,b){this._showSideSlide(b[0],-1)},API_SET_SLIDE:function(b,c){var d,e,f,g,h,i,j,k,l,m=c[0],n=c[1];d=this.cast("GET_IMAGES",[m]),d.length&&is_def(e=d[n])&&(this._current["@"+m]=n,a("#zone_gallery_navigator_status_"+m).text(n+1+"/"+d.length),this._thumbs["@"+m].find("img").eq(n).animate({opacity:1}).end().not(":eq("+n+")").animate({opacity:.5}),f=this._holders["@"+m],g=f.parent().innerWidth(),h=e.$obj.prop("width"),j=e.$obj.prop("height"),0==h&&(h=e.$obj.attr("width")),0==j&&(j=e.$obj.attr("height")),h>g-20&&(i=g-20,l=i/h,k=Math.floor(j*l),h=i,j=k,e.$obj.css("cursor","pointer"),e.$obj.attr("rel","xe_gallery")),e.$obj.css({width:h,height:j,margin:"0 10px"}),f.empty().append(e.$obj))}}),c=xe.getApp("Gallery")[0];c&&c.registerPlugin(new b)}(jQuery);
|
|
//# sourceMappingURL=slide_gallery.min.map
|