/usr/share/javascript/jquery-geo/jquery.geo.tiled.min.js is in libjs-jquery-geo 1.0~b1+ds1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 | (function(a,b){a.geo._serviceTypes.tiled=function(){return{create:function(b,c,d,e){var f=a.data(d,"geoServiceState");if(!f){f={loadCount:0,reloadTiles:!1};var g='<div data-geo-service="tiled" style="-webkit-transform:translateZ(0); position:absolute; left:0; top:0; width:8px; height:8px; margin:0; padding:0;"></div>';c.append(g),f.serviceContainer=c.children(":last"),a.data(d,"geoServiceState",f)}return f.serviceContainer},destroy:function(b,c,d){var e=a.data(d,"geoServiceState");e.serviceContainer.remove(),a.removeData(d,"geoServiceState")},interactiveTransform:function(b,c,d,e){var f=a.data(c,"geoServiceState"),g=b.options.tilingScheme;f&&(this._cancelUnloaded(b,c),f.serviceContainer.children().each(function(c){var f=a(this),h=f.data("pixelSize"),i=h/e;if(h>0){i=Math.round(i*1e3)/1e3;var j=f.data("scaleOrigin"),k=b._toPixel(j,d,e);f.css({left:Math.round(k[0])+"px",top:Math.round(k[1])+"px",width:g.tileWidth*i,height:g.tileHeight*i})}}))},refresh:function(b,c,d){var e=a.data(c,"geoServiceState");this._cancelUnloaded(b,c),e&&d&&(e.reloadTiles=!0);if(e&&c&&c.style.visibility==="visible"&&!e.serviceContainer.is(":hidden")){var f=b._getBbox(),g=b._pixelSize,h=this,i=e.serviceContainer,j=b._getContentBounds(),k=j.width,l=j.height,m=b.options.axisLayout==="image",n=m?1:-1,o=b.options.tilingScheme,p=o.tileWidth,q=o.tileHeight,r=Math.floor((f[0]-o.origin[0])/(g*p)),s=Math.max(Math.floor((m?f[1]-o.origin[1]:o.origin[1]-f[3])/(g*q)),0),t=Math.ceil((f[2]-o.origin[0])/(g*p)),u=Math.ceil((m?f[3]-o.origin[1]:o.origin[1]-f[1])/(g*q)),v=b._getBboxMax(),w=b._getPixelSize(0),x=w/g,y=Math.floor((v[0]-o.origin[0])/(w*p))*x,z=Math.floor((o.origin[1]+n*v[3])/(w*q))*x,A=o.origin[0]+y*p*g,B=o.origin[1]+n*z*q*g,C=Math.round((A-f[0])/g),D=Math.round((m?B-f[1]:f[3]-B)/g),E=i.children().show(),F=E.filter("[data-pixel-size='"+g+"']").appendTo(i),G=c.style.opacity,H,I,J=function(c){h._loadImage(a.data(this,"img"),c,g,b,e,G)},K=function(){a.data(this,"img").remove(),e.loadCount--,b._requestComplete()};e.reloadTiles&&E.find("img").attr("data-dirty","true"),F.size()?(F.css({left:C%p+"px",top:D%q+"px"}).data("scaleOrigin",b._toMap([C%p,D%q])),F.children().each(function(b){var c=a(this),d=c.attr("data-tile").split(",");c.css({left:Math.round((parseInt(d[0],10)-y)*100+(C-C%p)/p*100)+"%",top:Math.round((parseInt(d[1],10)-z)*100+(D-D%q)/q*100)+"%"}),G<1&&c.fadeTo(0,G)})):(i.append("<div style='-webkit-transform:translateZ(0);position:absolute; left:"+C%p+"px; top:"+D%q+"px; width:"+p+"px; height:"+q+"px; margin:0; padding:0;' data-pixel-size='"+g+"'></div>"),F=i.children(":last").data("scaleOrigin",b._toMap([C%p,D%q])));for(H=r;H<t;H++)for(I=s;I<u;I++){var L=""+H+","+I,M=F.children("[data-tile='"+L+"']").removeAttr("data-dirty");if(M.size()===0||e.reloadTiles){var N=[o.origin[0]+H*p*g,o.origin[1]+n*I*q*g],O=[o.origin[0]+((H+1)*p-1)*g,o.origin[1]+n*((I+1)*q-1)*g],P=[N[0],N[1],O[0],O[1]],Q=c.hasOwnProperty("src")?"src":"getUrl",R={bbox:P,width:p,height:q,zoom:b._getZoom(),tile:{row:I,column:H},index:Math.abs(I+H)},S=a.isFunction(c[Q]),T;S?T=c[Q](R):(a.templates("geoSrc",c[Q]),T=a.render.geoSrc(R)),e.loadCount++,b._requestQueued();if(e.reloadTiles&&M.size()>0)M.attr("src",T);else{var U="<img style='-webkit-transform:translateZ(0);position:absolute; left:"+((H-y)*100+(C-C%p)/p*100)+"%; "+"top:"+((I-z)*100+(D-D%q)/q*100)+"%; ";U+="width: 100%; height: 100%;",U+="margin:0; padding:0; -khtml-user-select:none; -moz-user-select:none; -webkit-user-select:none; user-select:none; display:none;' unselectable='on' data-tile='"+L+"' />",F.append(U),M=F.children(":last")}typeof T=="string"?h._loadImage(M,T,g,b,e,G):T?(a.data(T,"img",M),T.done(J).fail(K)):M.remove()}}E.find("[data-dirty]").remove(),e.reloadTiles=!1}},resize:function(a,b){},opacity:function(b,c){var d=a.data(c,"geoServiceState");d.serviceContainer.find("img").stop(!0).fadeTo("fast",c.style.opacity)},toggle:function(b,c){var d=a.data(c,"geoServiceState");d.serviceContainer.css("display",c.style.visibility==="visible"?"block":"none")},_cancelUnloaded:function(b,c){var d=a.data(c,"geoServiceState");if(d&&d.loadCount>0){d.serviceContainer.find("img:hidden").remove();while(d.loadCount>0)d.loadCount--,b._requestComplete()}},_loadImage:function(b,c,d,e,f,g){var h=f.serviceContainer;b.load(function(b){g<1?a(b.target).fadeTo(0,g):a(b.target).show(),f.loadCount--,e._requestComplete(),f.loadCount<=0&&(h.children(":not([data-pixel-size='"+d+"'])").remove(),f.loadCount=0)}).error(function(b){a(b.target).remove(),f.loadCount--,e._requestComplete(),f.loadCount<=0&&(h.children(":not([data-pixel-size='"+d+"'])").remove(),f.loadCount=0)}).attr("src",c)}}}()})(jQuery);
|