Files
hb_pqs_web/public/static/map/modules/copyrightctrl_ebvxlr.js
2025-01-09 19:02:44 +08:00

2 lines
2.3 KiB
JavaScript

/**/_jsload2&&_jsload2('copyrightctrl', 'x.extend(Sc.prototype,{yf:function(){this.D&&this.Ie(this.D)},initialize:function(a){Nc.prototype.initialize.call(this,a);this.Ba();this.Ao();this.ca(a);return this.C},ca:function(a){var b=this;a.addEventListener("load",function(){b.Ao()});a.addEventListener("moveend",function(){b.Ao()});a.addEventListener("zoomend",function(){b.Ao()});a.addEventListener("maptypechange",function(){b.C&&(b.C.style.color=b.D.oa().Km())})},Ba:function(){Nc.prototype.Ba.call(this);x.K.Ta(this.C,"BMap_cpyCtrl");var a= this.C.style;a.cursor="default";a.whiteSpace="nowrap";a.MozUserSelect="none";a.color=this.D.oa().Km();a.background="none";a.font="11px/15px "+I.fontFamily;Nc.prototype.Xr.call(this)},Ao:function(){if(this.D&&this.C&&0!=this.bc.length)for(var a=0,b=this.bc.length;a<b;a++){this.D.ga();var c=this.D.Rb({x:0,y:0}),d=this.D.Rb({x:this.D.width,y:this.D.height}),c=new hb(c,d);if(this.bc[a].bounds&&c.At(this.bc[a].bounds)==p){if(this.C)for(d=0;d<this.C.children.length;d++)if(this.C.children[d].getAttribute("_cid")== this.bc[a].id&&"none"!=this.C.children[d].style.display){this.C.children[d].style.display="none";return}}else if(this.C){for(var c=q,d=0,e=this.C.children.length;d<e;d++)if(this.C.children[d].getAttribute("_cid")==this.bc[a].id){c=o;this.C.children[d].style.display="inline";this.C.children[d].innerHTML!=this.bc[a].content&&(this.C.children[d].innerHTML=this.bc[a].content);break}c||this.er(this.bc[a])}}},Dw:function(a){if(a&&Ya(a.id)&&!isNaN(a.id)){var b={bounds:p,content:""},c;for(c in a)b[c]=a[c]; if(a=this.Am(a.id))for(var d in b)a[d]=b[d];else this.bc.push(b);this.Ao()}},Am:function(a){for(var b=0,c=this.bc.length;b<c;b++)if(this.bc[b].id==a)return this.bc[b]},YD:v("bc"),uF:function(a){for(var b,c=0,d=this.bc.length;c<d;c++)this.bc[c].id==a&&(b=this.bc.splice(c,1),c--,d=this.bc.length);(a=this.Ld(a))&&a.parentNode&&a.parentNode.removeChild(a);this.Ao();return b},er:function(a){this.C&&(this.C.innerHTML+="<span _cid=\'"+a.id+"\'>"+a.content+"</span>")},Ld:function(a){var b=Nc.prototype.Ld.call(this); if(Ib(a)){if(b)for(var c=0,d=b.children.length;c<d;c++)if(b.children[c].getAttribute("_cid")==a)return b.children[c]}else return b}});U(ig,{addCopyright:ig.Dw,removeCopyright:ig.uF,getCopyright:ig.Am,getCopyrightCollection:ig.YD}); ');