You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pingAnQiYeWeb/public/modules/drawbysvg_1uou2h.js

1 line
1.5 KiB

/**/_jsload2 && _jsload2('drawbysvg', 'function vh(a){this.D=a;this.fH="http://www.w3.org/2000/svg";this.kV={strokeweight:"stroke-width",strokecolor:"stroke",fillcolor:"fill",strokeopacity:"stroke-opacity",fillopacity:"fill-opacity",strokestyle:"stroke-dasharray"};this.hf=this.uA();this.Lb="svg"}vh.prototype=new B.Gz;var wh=vh.prototype; wh.uA=function(){var a=this.hf=H("svg",{},this.fH);a.setAttribute("version","1.1");a.setAttribute("type","system");a.style.position="absolute";this.bG();this.D.Rf().Vt.appendChild(a);x.M(a,J()?"touchstart":"mousedown",Gb);return a}; wh.bG=function(){if(this.hf){var a=this.hf,b=this.D,c=b.B.Cx,d=b.width+2*c,e=b.height+2*c,f=-b.offsetX-c,b=-b.offsetY-c;this.setAttribute(a,"x",d+"px");this.setAttribute(a,"y",e+"px");this.setAttribute(a,"viewBox",f+" "+b+" "+d+" "+e);a=a.style;a.top=b+"px";a.left=f+"px";a.width=d+"px";a.height=e+"px"}};wh.T3=v("hf");wh.setAttribute=function(a,b,c,d){if(a)return"strokestyle"==b&&(c="solid"==c?0:2*d),a.setAttributeNS(p,this.ur(b),c||"none"),a};wh.ur=function(a){return this.kV[a]||a}; wh.To=function(){var a=H("path",{},this.fH);this.setAttribute(a,"stroke-linejoin","round");this.setAttribute(a,"stroke-linecap","round");this.setAttribute(a,"fill-rule","evenodd");this.hf.appendChild(a);return a};wh.me=function(a,b){var c=this.OA(b)||"M -9999,-9999";this.setAttribute(a,"d",c)};wh.OA=function(a){if(0==a.length)return"";var b=[];x.kc.Fb(a,function(a){if(!(2>a.length)){b.push("M "+a[0].x+" "+a[0].y+" L");for(var d=1,e=a.length;d<e;d++)b.push(a[d].x),b.push(a[d].y)}});return b.join(" ")}; B.tQ=vh; ');