风场信息.js 96 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724
  1. ht.lib = ht.lib || {};
  2. if (!ht.lib['风场信息']) {
  3. ht.lib['风场信息'] = function (x, y, width, height, angle, localVarObj, localDynamicVar, nodename) {
  4. _ratio = GD.getRatioWithRotation(0, ratio);
  5. ht.lib['风场信息'].superClass.constructor.apply(this);
  6. this.localVarObj = localVarObj;
  7. this.localDynamicVar = localDynamicVar;
  8. this.childNodes = [];
  9. this._styleObject = {};
  10. this._originWidth = 146*_ratio.ratioX;
  11. this._originHeight = 141*_ratio.ratioY;
  12. this._baseClass = "ht.lib.风场信息";
  13. this._background = new ht.Node();
  14. this._background.setWidth(this._originWidth);
  15. this._background.setHeight(this._originHeight);
  16. this._background.setPosition(this._originWidth/2, this._originHeight/2);
  17. this._background.setImage({
  18. width: width,
  19. height: height,
  20. clip: true,
  21. comps: [
  22. {
  23. type: 'rect',
  24. background: 'rgba(0,255,0,0)',
  25. rect: [0,0,width, height]
  26. }
  27. ]
  28. });
  29. this._background.__parentLib = nodename;
  30. this._background.isLibBackground = true;
  31. this.childNodes.push(this._background);
  32. dataModel.add(this._background);
  33. /*@PageBackgroundInit@*/
  34. /*@PageBeforeInit@*/
  35. var Lib_风场信息Node0;
  36. (function () {
  37. var _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  38. var ratioX, ratioY;
  39. if ('Default' === 'False') {
  40. ratioX = 1;
  41. ratioY = 1;
  42. } else if ('Default' === 'X') {
  43. ratioX = ratioY = _ratio.ratioX;
  44. } else if ('Default' === 'Y') {
  45. ratioX = ratioY = _ratio.ratioY;
  46. } else {
  47. ratioX = _ratio.ratioX;
  48. ratioY = _ratio.ratioY;
  49. }
  50. ht.Default.setImage('imgimage//img//map_name_03.png', PAGEROOTDIR + 'image//img//map_name_03.png');
  51. Lib_风场信息Node0 = new ht.Node();
  52. Lib_风场信息Node0.setPosition(73*ratio.ratioX, 70*ratio.ratioY);
  53. Lib_风场信息Node0.setSize(146*ratioX, 141*ratioY);
  54. Lib_风场信息Node0.setImage('imgimage//img//map_name_03.png');
  55. Lib_风场信息Node0.setRotation(0*Math.PI/180);
  56. Lib_风场信息Node0._zoomBy = 'Default';
  57. Lib_风场信息Node0._nodeType = 'image';
  58. Lib_风场信息Node0._disallowEvert = true;
  59. dataModel.add(Lib_风场信息Node0);
  60. })();
  61. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  62. var Lib_风场信息Node1 = new ht.Node();
  63. var Lib_风场信息Node1textStart, Lib_风场信息Node1textWidth, Lib_风场信息Node1lineStart, Lib_风场信息Node1align = 'left', Lib_风场信息Node1fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node1width = 51*_ratio.ratioX, Lib_风场信息Node1height = 13*_ratio.ratioY;
  64. (function () {
  65. if (Lib_风场信息Node1align === 'left') {
  66. Lib_风场信息Node1textStart = Lib_风场信息Node1fontSize * 0.2 > 2 ? Lib_风场信息Node1fontSize * 0.2 - 4 : Lib_风场信息Node1fontSize * 0.2 - 9;
  67. Lib_风场信息Node1textWidth = Lib_风场信息Node1width;
  68. Lib_风场信息Node1lineStart = 1;
  69. } else if (Lib_风场信息Node1align === 'right') {
  70. Lib_风场信息Node1textStart = 0;
  71. Lib_风场信息Node1textWidth =Lib_风场信息Node1fontSize <= 8 ? Lib_风场信息Node1width + Lib_风场信息Node1fontSize * 0.2 + 6 : Lib_风场信息Node1width - Lib_风场信息Node1fontSize * 0.2;
  72. Lib_风场信息Node1lineStart = (Lib_风场信息Node1width - (ht.Default.getTextSize('风机台数', ' '+ Lib_风场信息Node1fontSize + 'px "Arial"').width + 6)) * 0.5;
  73. } else if (Lib_风场信息Node1align === 'center') {
  74. Lib_风场信息Node1textStart = -3;
  75. Lib_风场信息Node1textWidth = Lib_风场信息Node1width;
  76. Lib_风场信息Node1lineStart = Lib_风场信息Node1width - ht.Default.getTextSize('风机台数', ' '+ Lib_风场信息Node1fontSize + 'px "Arial"').width - 11;
  77. }
  78. })();
  79. Lib_风场信息Node1.setImage(GD.getTextJSON(Lib_风场信息Node1width, Lib_风场信息Node1height, true, false, false, ' '+ Lib_风场信息Node1fontSize + 'px "Arial"'))
  80. Lib_风场信息Node1.setPosition(32*ratio.ratioX, 23*ratio.ratioY);
  81. Lib_风场信息Node1.setWidth(Lib_风场信息Node1width);
  82. Lib_风场信息Node1.setHeight(Lib_风场信息Node1height);
  83. Lib_风场信息Node1._nodeType = 'text';
  84. Lib_风场信息Node1._disallowEvert = true;
  85. Lib_风场信息Node1.setRotation(0*Math.PI/180);
  86. Lib_风场信息Node1.a('node.width', Lib_风场信息Node1width);
  87. Lib_风场信息Node1.a('node.height', Lib_风场信息Node1height);
  88. Lib_风场信息Node1.a('node.rect', [0, 0, Lib_风场信息Node1width, Lib_风场信息Node1height]);
  89. Lib_风场信息Node1.a('node.bordercolor','rgba(0,0,0,1)');
  90. Lib_风场信息Node1.a('node.borderwidth', 0);
  91. Lib_风场信息Node1.a('node.background','' || 'rgba(0,0,0,0)');
  92. Lib_风场信息Node1.a('node.gradient','');
  93. Lib_风场信息Node1.a('node.gradientcolor','');
  94. Lib_风场信息Node1.a('node.text','风机台数');
  95. Lib_风场信息Node1.a('node.textalign','left');
  96. Lib_风场信息Node1.a('node.textvAlign','middle');
  97. Lib_风场信息Node1.a('node.textrect', [Lib_风场信息Node1textStart, 0, Lib_风场信息Node1textWidth, Lib_风场信息Node1height]);
  98. Lib_风场信息Node1.a('node.color','rgba(0,0,0,1)');
  99. Lib_风场信息Node1.a('node.font',' '+ Lib_风场信息Node1fontSize + 'px "Arial"');
  100. Lib_风场信息Node1.a('node.textvisible',true);
  101. Lib_风场信息Node1.a('node.linefeed',false);
  102. if (false) {
  103. Lib_风场信息Node1.a('node.textfunc',function(g) {
  104. g.beginPath();
  105. var str=Lib_风场信息Node1.a('node.text') || '风机台数';
  106. var color=Lib_风场信息Node1.a('node.color') || 'rgba(0,0,0,1)';
  107. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node1width,Lib_风场信息Node1height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node1fontSize + 'px "Arial"', 0,g);
  108. });
  109. }
  110. if (false) {
  111. Lib_风场信息Node1.a('node.underlinepoints',[Lib_风场信息Node1lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node1fontSize + 2 , ht.Default.getTextSize('风机台数', ' '+ Lib_风场信息Node1fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node1height - Lib_风场信息Node1fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node1fontSize + 2 ]);
  112. Lib_风场信息Node1.a('node.underlinevisible',false);
  113. Lib_风场信息Node1.a('node.underlineBorderWidth', 1);
  114. }
  115. dataModel.add(Lib_风场信息Node1);
  116. zoomNodeList.push({
  117. node: Lib_风场信息Node1,
  118. borderWidth: 0,
  119. attr: 'node.borderwidth'
  120. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  121. var Lib_风场信息Node2 = new ht.Node();
  122. var Lib_风场信息Node2textStart, Lib_风场信息Node2textWidth, Lib_风场信息Node2lineStart, Lib_风场信息Node2align = 'left', Lib_风场信息Node2fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node2width = 15*_ratio.ratioX, Lib_风场信息Node2height = 13*_ratio.ratioY;
  123. (function () {
  124. if (Lib_风场信息Node2align === 'left') {
  125. Lib_风场信息Node2textStart = Lib_风场信息Node2fontSize * 0.2 > 2 ? Lib_风场信息Node2fontSize * 0.2 - 4 : Lib_风场信息Node2fontSize * 0.2 - 9;
  126. Lib_风场信息Node2textWidth = Lib_风场信息Node2width;
  127. Lib_风场信息Node2lineStart = 1;
  128. } else if (Lib_风场信息Node2align === 'right') {
  129. Lib_风场信息Node2textStart = 0;
  130. Lib_风场信息Node2textWidth =Lib_风场信息Node2fontSize <= 8 ? Lib_风场信息Node2width + Lib_风场信息Node2fontSize * 0.2 + 6 : Lib_风场信息Node2width - Lib_风场信息Node2fontSize * 0.2;
  131. Lib_风场信息Node2lineStart = (Lib_风场信息Node2width - (ht.Default.getTextSize('99', ' '+ Lib_风场信息Node2fontSize + 'px "Arial"').width + 6)) * 0.5;
  132. } else if (Lib_风场信息Node2align === 'center') {
  133. Lib_风场信息Node2textStart = -3;
  134. Lib_风场信息Node2textWidth = Lib_风场信息Node2width;
  135. Lib_风场信息Node2lineStart = Lib_风场信息Node2width - ht.Default.getTextSize('99', ' '+ Lib_风场信息Node2fontSize + 'px "Arial"').width - 11;
  136. }
  137. })();
  138. Lib_风场信息Node2.setImage(GD.getTextJSON(Lib_风场信息Node2width, Lib_风场信息Node2height, true, false, false, ' '+ Lib_风场信息Node2fontSize + 'px "Arial"'))
  139. Lib_风场信息Node2.setPosition(78*ratio.ratioX, 23*ratio.ratioY);
  140. Lib_风场信息Node2.setWidth(Lib_风场信息Node2width);
  141. Lib_风场信息Node2.setHeight(Lib_风场信息Node2height);
  142. Lib_风场信息Node2._nodeType = 'text';
  143. Lib_风场信息Node2._disallowEvert = true;
  144. Lib_风场信息Node2.setRotation(0*Math.PI/180);
  145. Lib_风场信息Node2.a('node.width', Lib_风场信息Node2width);
  146. Lib_风场信息Node2.a('node.height', Lib_风场信息Node2height);
  147. Lib_风场信息Node2.a('node.rect', [0, 0, Lib_风场信息Node2width, Lib_风场信息Node2height]);
  148. Lib_风场信息Node2.a('node.bordercolor','rgba(192,0,0,1)');
  149. Lib_风场信息Node2.a('node.borderwidth', 0);
  150. Lib_风场信息Node2.a('node.background','' || 'rgba(0,0,0,0)');
  151. Lib_风场信息Node2.a('node.gradient','');
  152. Lib_风场信息Node2.a('node.gradientcolor','');
  153. Lib_风场信息Node2.a('node.text','99');
  154. Lib_风场信息Node2.a('node.textalign','left');
  155. Lib_风场信息Node2.a('node.textvAlign','middle');
  156. Lib_风场信息Node2.a('node.textrect', [Lib_风场信息Node2textStart, 0, Lib_风场信息Node2textWidth, Lib_风场信息Node2height]);
  157. Lib_风场信息Node2.a('node.color','rgba(192,0,0,1)');
  158. Lib_风场信息Node2.a('node.font',' '+ Lib_风场信息Node2fontSize + 'px "Arial"');
  159. Lib_风场信息Node2.a('node.textvisible',true);
  160. Lib_风场信息Node2.a('node.linefeed',false);
  161. if (false) {
  162. Lib_风场信息Node2.a('node.textfunc',function(g) {
  163. g.beginPath();
  164. var str=Lib_风场信息Node2.a('node.text') || '99';
  165. var color=Lib_风场信息Node2.a('node.color') || 'rgba(192,0,0,1)';
  166. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node2width,Lib_风场信息Node2height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node2fontSize + 'px "Arial"', 0,g);
  167. });
  168. }
  169. if (false) {
  170. Lib_风场信息Node2.a('node.underlinepoints',[Lib_风场信息Node2lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node2fontSize + 2 , ht.Default.getTextSize('99', ' '+ Lib_风场信息Node2fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node2height - Lib_风场信息Node2fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node2fontSize + 2 ]);
  171. Lib_风场信息Node2.a('node.underlinevisible',false);
  172. Lib_风场信息Node2.a('node.underlineBorderWidth', 1);
  173. }
  174. dataModel.add(Lib_风场信息Node2);
  175. zoomNodeList.push({
  176. node: Lib_风场信息Node2,
  177. borderWidth: 0,
  178. attr: 'node.borderwidth'
  179. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  180. var Lib_风场信息Node3 = new ht.Node();
  181. var Lib_风场信息Node3textStart, Lib_风场信息Node3textWidth, Lib_风场信息Node3lineStart, Lib_风场信息Node3align = 'left', Lib_风场信息Node3fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node3width = 35*_ratio.ratioX, Lib_风场信息Node3height = 13*_ratio.ratioY;
  182. (function () {
  183. if (Lib_风场信息Node3align === 'left') {
  184. Lib_风场信息Node3textStart = Lib_风场信息Node3fontSize * 0.2 > 2 ? Lib_风场信息Node3fontSize * 0.2 - 4 : Lib_风场信息Node3fontSize * 0.2 - 9;
  185. Lib_风场信息Node3textWidth = Lib_风场信息Node3width;
  186. Lib_风场信息Node3lineStart = 1;
  187. } else if (Lib_风场信息Node3align === 'right') {
  188. Lib_风场信息Node3textStart = 0;
  189. Lib_风场信息Node3textWidth =Lib_风场信息Node3fontSize <= 8 ? Lib_风场信息Node3width + Lib_风场信息Node3fontSize * 0.2 + 6 : Lib_风场信息Node3width - Lib_风场信息Node3fontSize * 0.2;
  190. Lib_风场信息Node3lineStart = (Lib_风场信息Node3width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node3fontSize + 'px "Arial"').width + 6)) * 0.5;
  191. } else if (Lib_风场信息Node3align === 'center') {
  192. Lib_风场信息Node3textStart = -3;
  193. Lib_风场信息Node3textWidth = Lib_风场信息Node3width;
  194. Lib_风场信息Node3lineStart = Lib_风场信息Node3width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node3fontSize + 'px "Arial"').width - 11;
  195. }
  196. })();
  197. Lib_风场信息Node3.setImage(GD.getTextJSON(Lib_风场信息Node3width, Lib_风场信息Node3height, true, false, false, ' '+ Lib_风场信息Node3fontSize + 'px "Arial"'))
  198. Lib_风场信息Node3.setPosition(124*ratio.ratioX, 23*ratio.ratioY);
  199. Lib_风场信息Node3.setWidth(Lib_风场信息Node3width);
  200. Lib_风场信息Node3.setHeight(Lib_风场信息Node3height);
  201. Lib_风场信息Node3._nodeType = 'text';
  202. Lib_风场信息Node3._disallowEvert = true;
  203. Lib_风场信息Node3.setRotation(0*Math.PI/180);
  204. Lib_风场信息Node3.a('node.width', Lib_风场信息Node3width);
  205. Lib_风场信息Node3.a('node.height', Lib_风场信息Node3height);
  206. Lib_风场信息Node3.a('node.rect', [0, 0, Lib_风场信息Node3width, Lib_风场信息Node3height]);
  207. Lib_风场信息Node3.a('node.bordercolor','rgba(0,0,0,1)');
  208. Lib_风场信息Node3.a('node.borderwidth', 0);
  209. Lib_风场信息Node3.a('node.background','' || 'rgba(0,0,0,0)');
  210. Lib_风场信息Node3.a('node.gradient','');
  211. Lib_风场信息Node3.a('node.gradientcolor','');
  212. Lib_风场信息Node3.a('node.text','万kwh');
  213. Lib_风场信息Node3.a('node.textalign','left');
  214. Lib_风场信息Node3.a('node.textvAlign','middle');
  215. Lib_风场信息Node3.a('node.textrect', [Lib_风场信息Node3textStart, 0, Lib_风场信息Node3textWidth, Lib_风场信息Node3height]);
  216. Lib_风场信息Node3.a('node.color','rgba(0,0,0,1)');
  217. Lib_风场信息Node3.a('node.font',' '+ Lib_风场信息Node3fontSize + 'px "Arial"');
  218. Lib_风场信息Node3.a('node.textvisible',true);
  219. Lib_风场信息Node3.a('node.linefeed',false);
  220. if (false) {
  221. Lib_风场信息Node3.a('node.textfunc',function(g) {
  222. g.beginPath();
  223. var str=Lib_风场信息Node3.a('node.text') || '万kwh';
  224. var color=Lib_风场信息Node3.a('node.color') || 'rgba(0,0,0,1)';
  225. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node3width,Lib_风场信息Node3height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node3fontSize + 'px "Arial"', 0,g);
  226. });
  227. }
  228. if (false) {
  229. Lib_风场信息Node3.a('node.underlinepoints',[Lib_风场信息Node3lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node3fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node3fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node3height - Lib_风场信息Node3fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node3fontSize + 2 ]);
  230. Lib_风场信息Node3.a('node.underlinevisible',false);
  231. Lib_风场信息Node3.a('node.underlineBorderWidth', 1);
  232. }
  233. dataModel.add(Lib_风场信息Node3);
  234. zoomNodeList.push({
  235. node: Lib_风场信息Node3,
  236. borderWidth: 0,
  237. attr: 'node.borderwidth'
  238. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  239. var Lib_风场信息Node4 = new ht.Node();
  240. var Lib_风场信息Node4textStart, Lib_风场信息Node4textWidth, Lib_风场信息Node4lineStart, Lib_风场信息Node4align = 'left', Lib_风场信息Node4fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node4width = 51*_ratio.ratioX, Lib_风场信息Node4height = 13*_ratio.ratioY;
  241. (function () {
  242. if (Lib_风场信息Node4align === 'left') {
  243. Lib_风场信息Node4textStart = Lib_风场信息Node4fontSize * 0.2 > 2 ? Lib_风场信息Node4fontSize * 0.2 - 4 : Lib_风场信息Node4fontSize * 0.2 - 9;
  244. Lib_风场信息Node4textWidth = Lib_风场信息Node4width;
  245. Lib_风场信息Node4lineStart = 1;
  246. } else if (Lib_风场信息Node4align === 'right') {
  247. Lib_风场信息Node4textStart = 0;
  248. Lib_风场信息Node4textWidth =Lib_风场信息Node4fontSize <= 8 ? Lib_风场信息Node4width + Lib_风场信息Node4fontSize * 0.2 + 6 : Lib_风场信息Node4width - Lib_风场信息Node4fontSize * 0.2;
  249. Lib_风场信息Node4lineStart = (Lib_风场信息Node4width - (ht.Default.getTextSize('装机容量', ' '+ Lib_风场信息Node4fontSize + 'px "Arial"').width + 6)) * 0.5;
  250. } else if (Lib_风场信息Node4align === 'center') {
  251. Lib_风场信息Node4textStart = -3;
  252. Lib_风场信息Node4textWidth = Lib_风场信息Node4width;
  253. Lib_风场信息Node4lineStart = Lib_风场信息Node4width - ht.Default.getTextSize('装机容量', ' '+ Lib_风场信息Node4fontSize + 'px "Arial"').width - 11;
  254. }
  255. })();
  256. Lib_风场信息Node4.setImage(GD.getTextJSON(Lib_风场信息Node4width, Lib_风场信息Node4height, true, false, false, ' '+ Lib_风场信息Node4fontSize + 'px "Arial"'))
  257. Lib_风场信息Node4.setPosition(32*ratio.ratioX, 49*ratio.ratioY);
  258. Lib_风场信息Node4.setWidth(Lib_风场信息Node4width);
  259. Lib_风场信息Node4.setHeight(Lib_风场信息Node4height);
  260. Lib_风场信息Node4._nodeType = 'text';
  261. Lib_风场信息Node4._disallowEvert = true;
  262. Lib_风场信息Node4.setRotation(0*Math.PI/180);
  263. Lib_风场信息Node4.a('node.width', Lib_风场信息Node4width);
  264. Lib_风场信息Node4.a('node.height', Lib_风场信息Node4height);
  265. Lib_风场信息Node4.a('node.rect', [0, 0, Lib_风场信息Node4width, Lib_风场信息Node4height]);
  266. Lib_风场信息Node4.a('node.bordercolor','rgba(0,0,0,1)');
  267. Lib_风场信息Node4.a('node.borderwidth', 0);
  268. Lib_风场信息Node4.a('node.background','' || 'rgba(0,0,0,0)');
  269. Lib_风场信息Node4.a('node.gradient','');
  270. Lib_风场信息Node4.a('node.gradientcolor','');
  271. Lib_风场信息Node4.a('node.text','装机容量');
  272. Lib_风场信息Node4.a('node.textalign','left');
  273. Lib_风场信息Node4.a('node.textvAlign','middle');
  274. Lib_风场信息Node4.a('node.textrect', [Lib_风场信息Node4textStart, 0, Lib_风场信息Node4textWidth, Lib_风场信息Node4height]);
  275. Lib_风场信息Node4.a('node.color','rgba(0,0,0,1)');
  276. Lib_风场信息Node4.a('node.font',' '+ Lib_风场信息Node4fontSize + 'px "Arial"');
  277. Lib_风场信息Node4.a('node.textvisible',true);
  278. Lib_风场信息Node4.a('node.linefeed',false);
  279. if (false) {
  280. Lib_风场信息Node4.a('node.textfunc',function(g) {
  281. g.beginPath();
  282. var str=Lib_风场信息Node4.a('node.text') || '装机容量';
  283. var color=Lib_风场信息Node4.a('node.color') || 'rgba(0,0,0,1)';
  284. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node4width,Lib_风场信息Node4height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node4fontSize + 'px "Arial"', 0,g);
  285. });
  286. }
  287. if (false) {
  288. Lib_风场信息Node4.a('node.underlinepoints',[Lib_风场信息Node4lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node4fontSize + 2 , ht.Default.getTextSize('装机容量', ' '+ Lib_风场信息Node4fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node4height - Lib_风场信息Node4fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node4fontSize + 2 ]);
  289. Lib_风场信息Node4.a('node.underlinevisible',false);
  290. Lib_风场信息Node4.a('node.underlineBorderWidth', 1);
  291. }
  292. dataModel.add(Lib_风场信息Node4);
  293. zoomNodeList.push({
  294. node: Lib_风场信息Node4,
  295. borderWidth: 0,
  296. attr: 'node.borderwidth'
  297. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  298. var Lib_风场信息Node5 = new ht.Node();
  299. var Lib_风场信息Node5textStart, Lib_风场信息Node5textWidth, Lib_风场信息Node5lineStart, Lib_风场信息Node5align = 'left', Lib_风场信息Node5fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node5width = 31*_ratio.ratioX, Lib_风场信息Node5height = 13*_ratio.ratioY;
  300. (function () {
  301. if (Lib_风场信息Node5align === 'left') {
  302. Lib_风场信息Node5textStart = Lib_风场信息Node5fontSize * 0.2 > 2 ? Lib_风场信息Node5fontSize * 0.2 - 4 : Lib_风场信息Node5fontSize * 0.2 - 9;
  303. Lib_风场信息Node5textWidth = Lib_风场信息Node5width;
  304. Lib_风场信息Node5lineStart = 1;
  305. } else if (Lib_风场信息Node5align === 'right') {
  306. Lib_风场信息Node5textStart = 0;
  307. Lib_风场信息Node5textWidth =Lib_风场信息Node5fontSize <= 8 ? Lib_风场信息Node5width + Lib_风场信息Node5fontSize * 0.2 + 6 : Lib_风场信息Node5width - Lib_风场信息Node5fontSize * 0.2;
  308. Lib_风场信息Node5lineStart = (Lib_风场信息Node5width - (ht.Default.getTextSize('14.85', ' '+ Lib_风场信息Node5fontSize + 'px "Arial"').width + 6)) * 0.5;
  309. } else if (Lib_风场信息Node5align === 'center') {
  310. Lib_风场信息Node5textStart = -3;
  311. Lib_风场信息Node5textWidth = Lib_风场信息Node5width;
  312. Lib_风场信息Node5lineStart = Lib_风场信息Node5width - ht.Default.getTextSize('14.85', ' '+ Lib_风场信息Node5fontSize + 'px "Arial"').width - 11;
  313. }
  314. })();
  315. Lib_风场信息Node5.setImage(GD.getTextJSON(Lib_风场信息Node5width, Lib_风场信息Node5height, true, false, false, ' '+ Lib_风场信息Node5fontSize + 'px "Arial"'))
  316. Lib_风场信息Node5.setPosition(86*ratio.ratioX, 49*ratio.ratioY);
  317. Lib_风场信息Node5.setWidth(Lib_风场信息Node5width);
  318. Lib_风场信息Node5.setHeight(Lib_风场信息Node5height);
  319. Lib_风场信息Node5._nodeType = 'text';
  320. Lib_风场信息Node5._disallowEvert = true;
  321. Lib_风场信息Node5.setRotation(0*Math.PI/180);
  322. Lib_风场信息Node5.a('node.width', Lib_风场信息Node5width);
  323. Lib_风场信息Node5.a('node.height', Lib_风场信息Node5height);
  324. Lib_风场信息Node5.a('node.rect', [0, 0, Lib_风场信息Node5width, Lib_风场信息Node5height]);
  325. Lib_风场信息Node5.a('node.bordercolor','rgba(192,0,0,1)');
  326. Lib_风场信息Node5.a('node.borderwidth', 0);
  327. Lib_风场信息Node5.a('node.background','' || 'rgba(0,0,0,0)');
  328. Lib_风场信息Node5.a('node.gradient','');
  329. Lib_风场信息Node5.a('node.gradientcolor','');
  330. Lib_风场信息Node5.a('node.text','14.85');
  331. Lib_风场信息Node5.a('node.textalign','left');
  332. Lib_风场信息Node5.a('node.textvAlign','middle');
  333. Lib_风场信息Node5.a('node.textrect', [Lib_风场信息Node5textStart, 0, Lib_风场信息Node5textWidth, Lib_风场信息Node5height]);
  334. Lib_风场信息Node5.a('node.color','rgba(192,0,0,1)');
  335. Lib_风场信息Node5.a('node.font',' '+ Lib_风场信息Node5fontSize + 'px "Arial"');
  336. Lib_风场信息Node5.a('node.textvisible',true);
  337. Lib_风场信息Node5.a('node.linefeed',false);
  338. if (false) {
  339. Lib_风场信息Node5.a('node.textfunc',function(g) {
  340. g.beginPath();
  341. var str=Lib_风场信息Node5.a('node.text') || '14.85';
  342. var color=Lib_风场信息Node5.a('node.color') || 'rgba(192,0,0,1)';
  343. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node5width,Lib_风场信息Node5height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node5fontSize + 'px "Arial"', 0,g);
  344. });
  345. }
  346. if (false) {
  347. Lib_风场信息Node5.a('node.underlinepoints',[Lib_风场信息Node5lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node5fontSize + 2 , ht.Default.getTextSize('14.85', ' '+ Lib_风场信息Node5fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node5height - Lib_风场信息Node5fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node5fontSize + 2 ]);
  348. Lib_风场信息Node5.a('node.underlinevisible',false);
  349. Lib_风场信息Node5.a('node.underlineBorderWidth', 1);
  350. }
  351. dataModel.add(Lib_风场信息Node5);
  352. zoomNodeList.push({
  353. node: Lib_风场信息Node5,
  354. borderWidth: 0,
  355. attr: 'node.borderwidth'
  356. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  357. var Lib_风场信息Node6 = new ht.Node();
  358. var Lib_风场信息Node6textStart, Lib_风场信息Node6textWidth, Lib_风场信息Node6lineStart, Lib_风场信息Node6align = 'left', Lib_风场信息Node6fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node6width = 35*_ratio.ratioX, Lib_风场信息Node6height = 13*_ratio.ratioY;
  359. (function () {
  360. if (Lib_风场信息Node6align === 'left') {
  361. Lib_风场信息Node6textStart = Lib_风场信息Node6fontSize * 0.2 > 2 ? Lib_风场信息Node6fontSize * 0.2 - 4 : Lib_风场信息Node6fontSize * 0.2 - 9;
  362. Lib_风场信息Node6textWidth = Lib_风场信息Node6width;
  363. Lib_风场信息Node6lineStart = 1;
  364. } else if (Lib_风场信息Node6align === 'right') {
  365. Lib_风场信息Node6textStart = 0;
  366. Lib_风场信息Node6textWidth =Lib_风场信息Node6fontSize <= 8 ? Lib_风场信息Node6width + Lib_风场信息Node6fontSize * 0.2 + 6 : Lib_风场信息Node6width - Lib_风场信息Node6fontSize * 0.2;
  367. Lib_风场信息Node6lineStart = (Lib_风场信息Node6width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node6fontSize + 'px "Arial"').width + 6)) * 0.5;
  368. } else if (Lib_风场信息Node6align === 'center') {
  369. Lib_风场信息Node6textStart = -3;
  370. Lib_风场信息Node6textWidth = Lib_风场信息Node6width;
  371. Lib_风场信息Node6lineStart = Lib_风场信息Node6width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node6fontSize + 'px "Arial"').width - 11;
  372. }
  373. })();
  374. Lib_风场信息Node6.setImage(GD.getTextJSON(Lib_风场信息Node6width, Lib_风场信息Node6height, true, false, false, ' '+ Lib_风场信息Node6fontSize + 'px "Arial"'))
  375. Lib_风场信息Node6.setPosition(124*ratio.ratioX, 49*ratio.ratioY);
  376. Lib_风场信息Node6.setWidth(Lib_风场信息Node6width);
  377. Lib_风场信息Node6.setHeight(Lib_风场信息Node6height);
  378. Lib_风场信息Node6._nodeType = 'text';
  379. Lib_风场信息Node6._disallowEvert = true;
  380. Lib_风场信息Node6.setRotation(0*Math.PI/180);
  381. Lib_风场信息Node6.a('node.width', Lib_风场信息Node6width);
  382. Lib_风场信息Node6.a('node.height', Lib_风场信息Node6height);
  383. Lib_风场信息Node6.a('node.rect', [0, 0, Lib_风场信息Node6width, Lib_风场信息Node6height]);
  384. Lib_风场信息Node6.a('node.bordercolor','rgba(0,0,0,1)');
  385. Lib_风场信息Node6.a('node.borderwidth', 0);
  386. Lib_风场信息Node6.a('node.background','' || 'rgba(0,0,0,0)');
  387. Lib_风场信息Node6.a('node.gradient','');
  388. Lib_风场信息Node6.a('node.gradientcolor','');
  389. Lib_风场信息Node6.a('node.text','万kwh');
  390. Lib_风场信息Node6.a('node.textalign','left');
  391. Lib_风场信息Node6.a('node.textvAlign','middle');
  392. Lib_风场信息Node6.a('node.textrect', [Lib_风场信息Node6textStart, 0, Lib_风场信息Node6textWidth, Lib_风场信息Node6height]);
  393. Lib_风场信息Node6.a('node.color','rgba(0,0,0,1)');
  394. Lib_风场信息Node6.a('node.font',' '+ Lib_风场信息Node6fontSize + 'px "Arial"');
  395. Lib_风场信息Node6.a('node.textvisible',true);
  396. Lib_风场信息Node6.a('node.linefeed',false);
  397. if (false) {
  398. Lib_风场信息Node6.a('node.textfunc',function(g) {
  399. g.beginPath();
  400. var str=Lib_风场信息Node6.a('node.text') || '万kwh';
  401. var color=Lib_风场信息Node6.a('node.color') || 'rgba(0,0,0,1)';
  402. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node6width,Lib_风场信息Node6height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node6fontSize + 'px "Arial"', 0,g);
  403. });
  404. }
  405. if (false) {
  406. Lib_风场信息Node6.a('node.underlinepoints',[Lib_风场信息Node6lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node6fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node6fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node6height - Lib_风场信息Node6fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node6fontSize + 2 ]);
  407. Lib_风场信息Node6.a('node.underlinevisible',false);
  408. Lib_风场信息Node6.a('node.underlineBorderWidth', 1);
  409. }
  410. dataModel.add(Lib_风场信息Node6);
  411. zoomNodeList.push({
  412. node: Lib_风场信息Node6,
  413. borderWidth: 0,
  414. attr: 'node.borderwidth'
  415. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  416. var Lib_风场信息Node7 = new ht.Node();
  417. var Lib_风场信息Node7textStart, Lib_风场信息Node7textWidth, Lib_风场信息Node7lineStart, Lib_风场信息Node7align = 'left', Lib_风场信息Node7fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node7width = 51*_ratio.ratioX, Lib_风场信息Node7height = 13*_ratio.ratioY;
  418. (function () {
  419. if (Lib_风场信息Node7align === 'left') {
  420. Lib_风场信息Node7textStart = Lib_风场信息Node7fontSize * 0.2 > 2 ? Lib_风场信息Node7fontSize * 0.2 - 4 : Lib_风场信息Node7fontSize * 0.2 - 9;
  421. Lib_风场信息Node7textWidth = Lib_风场信息Node7width;
  422. Lib_风场信息Node7lineStart = 1;
  423. } else if (Lib_风场信息Node7align === 'right') {
  424. Lib_风场信息Node7textStart = 0;
  425. Lib_风场信息Node7textWidth =Lib_风场信息Node7fontSize <= 8 ? Lib_风场信息Node7width + Lib_风场信息Node7fontSize * 0.2 + 6 : Lib_风场信息Node7width - Lib_风场信息Node7fontSize * 0.2;
  426. Lib_风场信息Node7lineStart = (Lib_风场信息Node7width - (ht.Default.getTextSize('平均风速', ' '+ Lib_风场信息Node7fontSize + 'px "Arial"').width + 6)) * 0.5;
  427. } else if (Lib_风场信息Node7align === 'center') {
  428. Lib_风场信息Node7textStart = -3;
  429. Lib_风场信息Node7textWidth = Lib_风场信息Node7width;
  430. Lib_风场信息Node7lineStart = Lib_风场信息Node7width - ht.Default.getTextSize('平均风速', ' '+ Lib_风场信息Node7fontSize + 'px "Arial"').width - 11;
  431. }
  432. })();
  433. Lib_风场信息Node7.setImage(GD.getTextJSON(Lib_风场信息Node7width, Lib_风场信息Node7height, true, false, false, ' '+ Lib_风场信息Node7fontSize + 'px "Arial"'))
  434. Lib_风场信息Node7.setPosition(32*ratio.ratioX, 74*ratio.ratioY);
  435. Lib_风场信息Node7.setWidth(Lib_风场信息Node7width);
  436. Lib_风场信息Node7.setHeight(Lib_风场信息Node7height);
  437. Lib_风场信息Node7._nodeType = 'text';
  438. Lib_风场信息Node7._disallowEvert = true;
  439. Lib_风场信息Node7.setRotation(0*Math.PI/180);
  440. Lib_风场信息Node7.a('node.width', Lib_风场信息Node7width);
  441. Lib_风场信息Node7.a('node.height', Lib_风场信息Node7height);
  442. Lib_风场信息Node7.a('node.rect', [0, 0, Lib_风场信息Node7width, Lib_风场信息Node7height]);
  443. Lib_风场信息Node7.a('node.bordercolor','rgba(0,0,0,1)');
  444. Lib_风场信息Node7.a('node.borderwidth', 0);
  445. Lib_风场信息Node7.a('node.background','' || 'rgba(0,0,0,0)');
  446. Lib_风场信息Node7.a('node.gradient','');
  447. Lib_风场信息Node7.a('node.gradientcolor','');
  448. Lib_风场信息Node7.a('node.text','平均风速');
  449. Lib_风场信息Node7.a('node.textalign','left');
  450. Lib_风场信息Node7.a('node.textvAlign','middle');
  451. Lib_风场信息Node7.a('node.textrect', [Lib_风场信息Node7textStart, 0, Lib_风场信息Node7textWidth, Lib_风场信息Node7height]);
  452. Lib_风场信息Node7.a('node.color','rgba(0,0,0,1)');
  453. Lib_风场信息Node7.a('node.font',' '+ Lib_风场信息Node7fontSize + 'px "Arial"');
  454. Lib_风场信息Node7.a('node.textvisible',true);
  455. Lib_风场信息Node7.a('node.linefeed',false);
  456. if (false) {
  457. Lib_风场信息Node7.a('node.textfunc',function(g) {
  458. g.beginPath();
  459. var str=Lib_风场信息Node7.a('node.text') || '平均风速';
  460. var color=Lib_风场信息Node7.a('node.color') || 'rgba(0,0,0,1)';
  461. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node7width,Lib_风场信息Node7height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node7fontSize + 'px "Arial"', 0,g);
  462. });
  463. }
  464. if (false) {
  465. Lib_风场信息Node7.a('node.underlinepoints',[Lib_风场信息Node7lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node7fontSize + 2 , ht.Default.getTextSize('平均风速', ' '+ Lib_风场信息Node7fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node7height - Lib_风场信息Node7fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node7fontSize + 2 ]);
  466. Lib_风场信息Node7.a('node.underlinevisible',false);
  467. Lib_风场信息Node7.a('node.underlineBorderWidth', 1);
  468. }
  469. dataModel.add(Lib_风场信息Node7);
  470. zoomNodeList.push({
  471. node: Lib_风场信息Node7,
  472. borderWidth: 0,
  473. attr: 'node.borderwidth'
  474. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  475. var Lib_风场信息Node8 = new ht.Node();
  476. var Lib_风场信息Node8textStart, Lib_风场信息Node8textWidth, Lib_风场信息Node8lineStart, Lib_风场信息Node8align = 'left', Lib_风场信息Node8fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node8width = 7*_ratio.ratioX, Lib_风场信息Node8height = 13*_ratio.ratioY;
  477. (function () {
  478. if (Lib_风场信息Node8align === 'left') {
  479. Lib_风场信息Node8textStart = Lib_风场信息Node8fontSize * 0.2 > 2 ? Lib_风场信息Node8fontSize * 0.2 - 4 : Lib_风场信息Node8fontSize * 0.2 - 9;
  480. Lib_风场信息Node8textWidth = Lib_风场信息Node8width;
  481. Lib_风场信息Node8lineStart = 1;
  482. } else if (Lib_风场信息Node8align === 'right') {
  483. Lib_风场信息Node8textStart = 0;
  484. Lib_风场信息Node8textWidth =Lib_风场信息Node8fontSize <= 8 ? Lib_风场信息Node8width + Lib_风场信息Node8fontSize * 0.2 + 6 : Lib_风场信息Node8width - Lib_风场信息Node8fontSize * 0.2;
  485. Lib_风场信息Node8lineStart = (Lib_风场信息Node8width - (ht.Default.getTextSize('-', ' '+ Lib_风场信息Node8fontSize + 'px "Arial"').width + 6)) * 0.5;
  486. } else if (Lib_风场信息Node8align === 'center') {
  487. Lib_风场信息Node8textStart = -3;
  488. Lib_风场信息Node8textWidth = Lib_风场信息Node8width;
  489. Lib_风场信息Node8lineStart = Lib_风场信息Node8width - ht.Default.getTextSize('-', ' '+ Lib_风场信息Node8fontSize + 'px "Arial"').width - 11;
  490. }
  491. })();
  492. Lib_风场信息Node8.setImage(GD.getTextJSON(Lib_风场信息Node8width, Lib_风场信息Node8height, true, false, false, ' '+ Lib_风场信息Node8fontSize + 'px "Arial"'))
  493. Lib_风场信息Node8.setPosition(74*ratio.ratioX, 74*ratio.ratioY);
  494. Lib_风场信息Node8.setWidth(Lib_风场信息Node8width);
  495. Lib_风场信息Node8.setHeight(Lib_风场信息Node8height);
  496. Lib_风场信息Node8._nodeType = 'text';
  497. Lib_风场信息Node8._disallowEvert = true;
  498. Lib_风场信息Node8.setRotation(0*Math.PI/180);
  499. Lib_风场信息Node8.a('node.width', Lib_风场信息Node8width);
  500. Lib_风场信息Node8.a('node.height', Lib_风场信息Node8height);
  501. Lib_风场信息Node8.a('node.rect', [0, 0, Lib_风场信息Node8width, Lib_风场信息Node8height]);
  502. Lib_风场信息Node8.a('node.bordercolor','rgba(192,0,0,1)');
  503. Lib_风场信息Node8.a('node.borderwidth', 0);
  504. Lib_风场信息Node8.a('node.background','' || 'rgba(0,0,0,0)');
  505. Lib_风场信息Node8.a('node.gradient','');
  506. Lib_风场信息Node8.a('node.gradientcolor','');
  507. Lib_风场信息Node8.a('node.text','-');
  508. Lib_风场信息Node8.a('node.textalign','left');
  509. Lib_风场信息Node8.a('node.textvAlign','middle');
  510. Lib_风场信息Node8.a('node.textrect', [Lib_风场信息Node8textStart, 0, Lib_风场信息Node8textWidth, Lib_风场信息Node8height]);
  511. Lib_风场信息Node8.a('node.color','rgba(192,0,0,1)');
  512. Lib_风场信息Node8.a('node.font',' '+ Lib_风场信息Node8fontSize + 'px "Arial"');
  513. Lib_风场信息Node8.a('node.textvisible',true);
  514. Lib_风场信息Node8.a('node.linefeed',false);
  515. if (false) {
  516. Lib_风场信息Node8.a('node.textfunc',function(g) {
  517. g.beginPath();
  518. var str=Lib_风场信息Node8.a('node.text') || '-';
  519. var color=Lib_风场信息Node8.a('node.color') || 'rgba(192,0,0,1)';
  520. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node8width,Lib_风场信息Node8height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node8fontSize + 'px "Arial"', 0,g);
  521. });
  522. }
  523. if (false) {
  524. Lib_风场信息Node8.a('node.underlinepoints',[Lib_风场信息Node8lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node8fontSize + 2 , ht.Default.getTextSize('-', ' '+ Lib_风场信息Node8fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node8height - Lib_风场信息Node8fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node8fontSize + 2 ]);
  525. Lib_风场信息Node8.a('node.underlinevisible',false);
  526. Lib_风场信息Node8.a('node.underlineBorderWidth', 1);
  527. }
  528. dataModel.add(Lib_风场信息Node8);
  529. zoomNodeList.push({
  530. node: Lib_风场信息Node8,
  531. borderWidth: 0,
  532. attr: 'node.borderwidth'
  533. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  534. var Lib_风场信息Node9 = new ht.Node();
  535. var Lib_风场信息Node9textStart, Lib_风场信息Node9textWidth, Lib_风场信息Node9lineStart, Lib_风场信息Node9align = 'left', Lib_风场信息Node9fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node9width = 35*_ratio.ratioX, Lib_风场信息Node9height = 13*_ratio.ratioY;
  536. (function () {
  537. if (Lib_风场信息Node9align === 'left') {
  538. Lib_风场信息Node9textStart = Lib_风场信息Node9fontSize * 0.2 > 2 ? Lib_风场信息Node9fontSize * 0.2 - 4 : Lib_风场信息Node9fontSize * 0.2 - 9;
  539. Lib_风场信息Node9textWidth = Lib_风场信息Node9width;
  540. Lib_风场信息Node9lineStart = 1;
  541. } else if (Lib_风场信息Node9align === 'right') {
  542. Lib_风场信息Node9textStart = 0;
  543. Lib_风场信息Node9textWidth =Lib_风场信息Node9fontSize <= 8 ? Lib_风场信息Node9width + Lib_风场信息Node9fontSize * 0.2 + 6 : Lib_风场信息Node9width - Lib_风场信息Node9fontSize * 0.2;
  544. Lib_风场信息Node9lineStart = (Lib_风场信息Node9width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node9fontSize + 'px "Arial"').width + 6)) * 0.5;
  545. } else if (Lib_风场信息Node9align === 'center') {
  546. Lib_风场信息Node9textStart = -3;
  547. Lib_风场信息Node9textWidth = Lib_风场信息Node9width;
  548. Lib_风场信息Node9lineStart = Lib_风场信息Node9width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node9fontSize + 'px "Arial"').width - 11;
  549. }
  550. })();
  551. Lib_风场信息Node9.setImage(GD.getTextJSON(Lib_风场信息Node9width, Lib_风场信息Node9height, true, false, false, ' '+ Lib_风场信息Node9fontSize + 'px "Arial"'))
  552. Lib_风场信息Node9.setPosition(124*ratio.ratioX, 74*ratio.ratioY);
  553. Lib_风场信息Node9.setWidth(Lib_风场信息Node9width);
  554. Lib_风场信息Node9.setHeight(Lib_风场信息Node9height);
  555. Lib_风场信息Node9._nodeType = 'text';
  556. Lib_风场信息Node9._disallowEvert = true;
  557. Lib_风场信息Node9.setRotation(0*Math.PI/180);
  558. Lib_风场信息Node9.a('node.width', Lib_风场信息Node9width);
  559. Lib_风场信息Node9.a('node.height', Lib_风场信息Node9height);
  560. Lib_风场信息Node9.a('node.rect', [0, 0, Lib_风场信息Node9width, Lib_风场信息Node9height]);
  561. Lib_风场信息Node9.a('node.bordercolor','rgba(0,0,0,1)');
  562. Lib_风场信息Node9.a('node.borderwidth', 0);
  563. Lib_风场信息Node9.a('node.background','' || 'rgba(0,0,0,0)');
  564. Lib_风场信息Node9.a('node.gradient','');
  565. Lib_风场信息Node9.a('node.gradientcolor','');
  566. Lib_风场信息Node9.a('node.text','万kwh');
  567. Lib_风场信息Node9.a('node.textalign','left');
  568. Lib_风场信息Node9.a('node.textvAlign','middle');
  569. Lib_风场信息Node9.a('node.textrect', [Lib_风场信息Node9textStart, 0, Lib_风场信息Node9textWidth, Lib_风场信息Node9height]);
  570. Lib_风场信息Node9.a('node.color','rgba(0,0,0,1)');
  571. Lib_风场信息Node9.a('node.font',' '+ Lib_风场信息Node9fontSize + 'px "Arial"');
  572. Lib_风场信息Node9.a('node.textvisible',true);
  573. Lib_风场信息Node9.a('node.linefeed',false);
  574. if (false) {
  575. Lib_风场信息Node9.a('node.textfunc',function(g) {
  576. g.beginPath();
  577. var str=Lib_风场信息Node9.a('node.text') || '万kwh';
  578. var color=Lib_风场信息Node9.a('node.color') || 'rgba(0,0,0,1)';
  579. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node9width,Lib_风场信息Node9height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node9fontSize + 'px "Arial"', 0,g);
  580. });
  581. }
  582. if (false) {
  583. Lib_风场信息Node9.a('node.underlinepoints',[Lib_风场信息Node9lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node9fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node9fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node9height - Lib_风场信息Node9fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node9fontSize + 2 ]);
  584. Lib_风场信息Node9.a('node.underlinevisible',false);
  585. Lib_风场信息Node9.a('node.underlineBorderWidth', 1);
  586. }
  587. dataModel.add(Lib_风场信息Node9);
  588. zoomNodeList.push({
  589. node: Lib_风场信息Node9,
  590. borderWidth: 0,
  591. attr: 'node.borderwidth'
  592. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  593. var Lib_风场信息Node10 = new ht.Node();
  594. var Lib_风场信息Node10textStart, Lib_风场信息Node10textWidth, Lib_风场信息Node10lineStart, Lib_风场信息Node10align = 'left', Lib_风场信息Node10fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node10width = 51*_ratio.ratioX, Lib_风场信息Node10height = 13*_ratio.ratioY;
  595. (function () {
  596. if (Lib_风场信息Node10align === 'left') {
  597. Lib_风场信息Node10textStart = Lib_风场信息Node10fontSize * 0.2 > 2 ? Lib_风场信息Node10fontSize * 0.2 - 4 : Lib_风场信息Node10fontSize * 0.2 - 9;
  598. Lib_风场信息Node10textWidth = Lib_风场信息Node10width;
  599. Lib_风场信息Node10lineStart = 1;
  600. } else if (Lib_风场信息Node10align === 'right') {
  601. Lib_风场信息Node10textStart = 0;
  602. Lib_风场信息Node10textWidth =Lib_风场信息Node10fontSize <= 8 ? Lib_风场信息Node10width + Lib_风场信息Node10fontSize * 0.2 + 6 : Lib_风场信息Node10width - Lib_风场信息Node10fontSize * 0.2;
  603. Lib_风场信息Node10lineStart = (Lib_风场信息Node10width - (ht.Default.getTextSize('日发电量', ' '+ Lib_风场信息Node10fontSize + 'px "Arial"').width + 6)) * 0.5;
  604. } else if (Lib_风场信息Node10align === 'center') {
  605. Lib_风场信息Node10textStart = -3;
  606. Lib_风场信息Node10textWidth = Lib_风场信息Node10width;
  607. Lib_风场信息Node10lineStart = Lib_风场信息Node10width - ht.Default.getTextSize('日发电量', ' '+ Lib_风场信息Node10fontSize + 'px "Arial"').width - 11;
  608. }
  609. })();
  610. Lib_风场信息Node10.setImage(GD.getTextJSON(Lib_风场信息Node10width, Lib_风场信息Node10height, true, false, false, ' '+ Lib_风场信息Node10fontSize + 'px "Arial"'))
  611. Lib_风场信息Node10.setPosition(32*ratio.ratioX, 100*ratio.ratioY);
  612. Lib_风场信息Node10.setWidth(Lib_风场信息Node10width);
  613. Lib_风场信息Node10.setHeight(Lib_风场信息Node10height);
  614. Lib_风场信息Node10._nodeType = 'text';
  615. Lib_风场信息Node10._disallowEvert = true;
  616. Lib_风场信息Node10.setRotation(0*Math.PI/180);
  617. Lib_风场信息Node10.a('node.width', Lib_风场信息Node10width);
  618. Lib_风场信息Node10.a('node.height', Lib_风场信息Node10height);
  619. Lib_风场信息Node10.a('node.rect', [0, 0, Lib_风场信息Node10width, Lib_风场信息Node10height]);
  620. Lib_风场信息Node10.a('node.bordercolor','rgba(0,0,0,1)');
  621. Lib_风场信息Node10.a('node.borderwidth', 0);
  622. Lib_风场信息Node10.a('node.background','' || 'rgba(0,0,0,0)');
  623. Lib_风场信息Node10.a('node.gradient','');
  624. Lib_风场信息Node10.a('node.gradientcolor','');
  625. Lib_风场信息Node10.a('node.text','日发电量');
  626. Lib_风场信息Node10.a('node.textalign','left');
  627. Lib_风场信息Node10.a('node.textvAlign','middle');
  628. Lib_风场信息Node10.a('node.textrect', [Lib_风场信息Node10textStart, 0, Lib_风场信息Node10textWidth, Lib_风场信息Node10height]);
  629. Lib_风场信息Node10.a('node.color','rgba(0,0,0,1)');
  630. Lib_风场信息Node10.a('node.font',' '+ Lib_风场信息Node10fontSize + 'px "Arial"');
  631. Lib_风场信息Node10.a('node.textvisible',true);
  632. Lib_风场信息Node10.a('node.linefeed',false);
  633. if (false) {
  634. Lib_风场信息Node10.a('node.textfunc',function(g) {
  635. g.beginPath();
  636. var str=Lib_风场信息Node10.a('node.text') || '日发电量';
  637. var color=Lib_风场信息Node10.a('node.color') || 'rgba(0,0,0,1)';
  638. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node10width,Lib_风场信息Node10height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node10fontSize + 'px "Arial"', 0,g);
  639. });
  640. }
  641. if (false) {
  642. Lib_风场信息Node10.a('node.underlinepoints',[Lib_风场信息Node10lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node10fontSize + 2 , ht.Default.getTextSize('日发电量', ' '+ Lib_风场信息Node10fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node10height - Lib_风场信息Node10fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node10fontSize + 2 ]);
  643. Lib_风场信息Node10.a('node.underlinevisible',false);
  644. Lib_风场信息Node10.a('node.underlineBorderWidth', 1);
  645. }
  646. dataModel.add(Lib_风场信息Node10);
  647. zoomNodeList.push({
  648. node: Lib_风场信息Node10,
  649. borderWidth: 0,
  650. attr: 'node.borderwidth'
  651. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  652. var Lib_风场信息Node11 = new ht.Node();
  653. var Lib_风场信息Node11textStart, Lib_风场信息Node11textWidth, Lib_风场信息Node11lineStart, Lib_风场信息Node11align = 'left', Lib_风场信息Node11fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node11width = 7*_ratio.ratioX, Lib_风场信息Node11height = 13*_ratio.ratioY;
  654. (function () {
  655. if (Lib_风场信息Node11align === 'left') {
  656. Lib_风场信息Node11textStart = Lib_风场信息Node11fontSize * 0.2 > 2 ? Lib_风场信息Node11fontSize * 0.2 - 4 : Lib_风场信息Node11fontSize * 0.2 - 9;
  657. Lib_风场信息Node11textWidth = Lib_风场信息Node11width;
  658. Lib_风场信息Node11lineStart = 1;
  659. } else if (Lib_风场信息Node11align === 'right') {
  660. Lib_风场信息Node11textStart = 0;
  661. Lib_风场信息Node11textWidth =Lib_风场信息Node11fontSize <= 8 ? Lib_风场信息Node11width + Lib_风场信息Node11fontSize * 0.2 + 6 : Lib_风场信息Node11width - Lib_风场信息Node11fontSize * 0.2;
  662. Lib_风场信息Node11lineStart = (Lib_风场信息Node11width - (ht.Default.getTextSize('-', ' '+ Lib_风场信息Node11fontSize + 'px "Arial"').width + 6)) * 0.5;
  663. } else if (Lib_风场信息Node11align === 'center') {
  664. Lib_风场信息Node11textStart = -3;
  665. Lib_风场信息Node11textWidth = Lib_风场信息Node11width;
  666. Lib_风场信息Node11lineStart = Lib_风场信息Node11width - ht.Default.getTextSize('-', ' '+ Lib_风场信息Node11fontSize + 'px "Arial"').width - 11;
  667. }
  668. })();
  669. Lib_风场信息Node11.setImage(GD.getTextJSON(Lib_风场信息Node11width, Lib_风场信息Node11height, true, false, false, ' '+ Lib_风场信息Node11fontSize + 'px "Arial"'))
  670. Lib_风场信息Node11.setPosition(74*ratio.ratioX, 100*ratio.ratioY);
  671. Lib_风场信息Node11.setWidth(Lib_风场信息Node11width);
  672. Lib_风场信息Node11.setHeight(Lib_风场信息Node11height);
  673. Lib_风场信息Node11._nodeType = 'text';
  674. Lib_风场信息Node11._disallowEvert = true;
  675. Lib_风场信息Node11.setRotation(0*Math.PI/180);
  676. Lib_风场信息Node11.a('node.width', Lib_风场信息Node11width);
  677. Lib_风场信息Node11.a('node.height', Lib_风场信息Node11height);
  678. Lib_风场信息Node11.a('node.rect', [0, 0, Lib_风场信息Node11width, Lib_风场信息Node11height]);
  679. Lib_风场信息Node11.a('node.bordercolor','rgba(192,0,0,1)');
  680. Lib_风场信息Node11.a('node.borderwidth', 0);
  681. Lib_风场信息Node11.a('node.background','' || 'rgba(0,0,0,0)');
  682. Lib_风场信息Node11.a('node.gradient','');
  683. Lib_风场信息Node11.a('node.gradientcolor','');
  684. Lib_风场信息Node11.a('node.text','-');
  685. Lib_风场信息Node11.a('node.textalign','left');
  686. Lib_风场信息Node11.a('node.textvAlign','middle');
  687. Lib_风场信息Node11.a('node.textrect', [Lib_风场信息Node11textStart, 0, Lib_风场信息Node11textWidth, Lib_风场信息Node11height]);
  688. Lib_风场信息Node11.a('node.color','rgba(192,0,0,1)');
  689. Lib_风场信息Node11.a('node.font',' '+ Lib_风场信息Node11fontSize + 'px "Arial"');
  690. Lib_风场信息Node11.a('node.textvisible',true);
  691. Lib_风场信息Node11.a('node.linefeed',false);
  692. if (false) {
  693. Lib_风场信息Node11.a('node.textfunc',function(g) {
  694. g.beginPath();
  695. var str=Lib_风场信息Node11.a('node.text') || '-';
  696. var color=Lib_风场信息Node11.a('node.color') || 'rgba(192,0,0,1)';
  697. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node11width,Lib_风场信息Node11height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node11fontSize + 'px "Arial"', 0,g);
  698. });
  699. }
  700. if (false) {
  701. Lib_风场信息Node11.a('node.underlinepoints',[Lib_风场信息Node11lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node11fontSize + 2 , ht.Default.getTextSize('-', ' '+ Lib_风场信息Node11fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node11height - Lib_风场信息Node11fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node11fontSize + 2 ]);
  702. Lib_风场信息Node11.a('node.underlinevisible',false);
  703. Lib_风场信息Node11.a('node.underlineBorderWidth', 1);
  704. }
  705. dataModel.add(Lib_风场信息Node11);
  706. zoomNodeList.push({
  707. node: Lib_风场信息Node11,
  708. borderWidth: 0,
  709. attr: 'node.borderwidth'
  710. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  711. var Lib_风场信息Node12 = new ht.Node();
  712. var Lib_风场信息Node12textStart, Lib_风场信息Node12textWidth, Lib_风场信息Node12lineStart, Lib_风场信息Node12align = 'left', Lib_风场信息Node12fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node12width = 35*_ratio.ratioX, Lib_风场信息Node12height = 13*_ratio.ratioY;
  713. (function () {
  714. if (Lib_风场信息Node12align === 'left') {
  715. Lib_风场信息Node12textStart = Lib_风场信息Node12fontSize * 0.2 > 2 ? Lib_风场信息Node12fontSize * 0.2 - 4 : Lib_风场信息Node12fontSize * 0.2 - 9;
  716. Lib_风场信息Node12textWidth = Lib_风场信息Node12width;
  717. Lib_风场信息Node12lineStart = 1;
  718. } else if (Lib_风场信息Node12align === 'right') {
  719. Lib_风场信息Node12textStart = 0;
  720. Lib_风场信息Node12textWidth =Lib_风场信息Node12fontSize <= 8 ? Lib_风场信息Node12width + Lib_风场信息Node12fontSize * 0.2 + 6 : Lib_风场信息Node12width - Lib_风场信息Node12fontSize * 0.2;
  721. Lib_风场信息Node12lineStart = (Lib_风场信息Node12width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node12fontSize + 'px "Arial"').width + 6)) * 0.5;
  722. } else if (Lib_风场信息Node12align === 'center') {
  723. Lib_风场信息Node12textStart = -3;
  724. Lib_风场信息Node12textWidth = Lib_风场信息Node12width;
  725. Lib_风场信息Node12lineStart = Lib_风场信息Node12width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node12fontSize + 'px "Arial"').width - 11;
  726. }
  727. })();
  728. Lib_风场信息Node12.setImage(GD.getTextJSON(Lib_风场信息Node12width, Lib_风场信息Node12height, true, false, false, ' '+ Lib_风场信息Node12fontSize + 'px "Arial"'))
  729. Lib_风场信息Node12.setPosition(124*ratio.ratioX, 100*ratio.ratioY);
  730. Lib_风场信息Node12.setWidth(Lib_风场信息Node12width);
  731. Lib_风场信息Node12.setHeight(Lib_风场信息Node12height);
  732. Lib_风场信息Node12._nodeType = 'text';
  733. Lib_风场信息Node12._disallowEvert = true;
  734. Lib_风场信息Node12.setRotation(0*Math.PI/180);
  735. Lib_风场信息Node12.a('node.width', Lib_风场信息Node12width);
  736. Lib_风场信息Node12.a('node.height', Lib_风场信息Node12height);
  737. Lib_风场信息Node12.a('node.rect', [0, 0, Lib_风场信息Node12width, Lib_风场信息Node12height]);
  738. Lib_风场信息Node12.a('node.bordercolor','rgba(0,0,0,1)');
  739. Lib_风场信息Node12.a('node.borderwidth', 0);
  740. Lib_风场信息Node12.a('node.background','' || 'rgba(0,0,0,0)');
  741. Lib_风场信息Node12.a('node.gradient','');
  742. Lib_风场信息Node12.a('node.gradientcolor','');
  743. Lib_风场信息Node12.a('node.text','万kwh');
  744. Lib_风场信息Node12.a('node.textalign','left');
  745. Lib_风场信息Node12.a('node.textvAlign','middle');
  746. Lib_风场信息Node12.a('node.textrect', [Lib_风场信息Node12textStart, 0, Lib_风场信息Node12textWidth, Lib_风场信息Node12height]);
  747. Lib_风场信息Node12.a('node.color','rgba(0,0,0,1)');
  748. Lib_风场信息Node12.a('node.font',' '+ Lib_风场信息Node12fontSize + 'px "Arial"');
  749. Lib_风场信息Node12.a('node.textvisible',true);
  750. Lib_风场信息Node12.a('node.linefeed',false);
  751. if (false) {
  752. Lib_风场信息Node12.a('node.textfunc',function(g) {
  753. g.beginPath();
  754. var str=Lib_风场信息Node12.a('node.text') || '万kwh';
  755. var color=Lib_风场信息Node12.a('node.color') || 'rgba(0,0,0,1)';
  756. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node12width,Lib_风场信息Node12height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node12fontSize + 'px "Arial"', 0,g);
  757. });
  758. }
  759. if (false) {
  760. Lib_风场信息Node12.a('node.underlinepoints',[Lib_风场信息Node12lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node12fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node12fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node12height - Lib_风场信息Node12fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node12fontSize + 2 ]);
  761. Lib_风场信息Node12.a('node.underlinevisible',false);
  762. Lib_风场信息Node12.a('node.underlineBorderWidth', 1);
  763. }
  764. dataModel.add(Lib_风场信息Node12);
  765. zoomNodeList.push({
  766. node: Lib_风场信息Node12,
  767. borderWidth: 0,
  768. attr: 'node.borderwidth'
  769. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  770. var Lib_风场信息Node13 = new ht.Node();
  771. var Lib_风场信息Node13textStart, Lib_风场信息Node13textWidth, Lib_风场信息Node13lineStart, Lib_风场信息Node13align = 'left', Lib_风场信息Node13fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node13width = 51*_ratio.ratioX, Lib_风场信息Node13height = 13*_ratio.ratioY;
  772. (function () {
  773. if (Lib_风场信息Node13align === 'left') {
  774. Lib_风场信息Node13textStart = Lib_风场信息Node13fontSize * 0.2 > 2 ? Lib_风场信息Node13fontSize * 0.2 - 4 : Lib_风场信息Node13fontSize * 0.2 - 9;
  775. Lib_风场信息Node13textWidth = Lib_风场信息Node13width;
  776. Lib_风场信息Node13lineStart = 1;
  777. } else if (Lib_风场信息Node13align === 'right') {
  778. Lib_风场信息Node13textStart = 0;
  779. Lib_风场信息Node13textWidth =Lib_风场信息Node13fontSize <= 8 ? Lib_风场信息Node13width + Lib_风场信息Node13fontSize * 0.2 + 6 : Lib_风场信息Node13width - Lib_风场信息Node13fontSize * 0.2;
  780. Lib_风场信息Node13lineStart = (Lib_风场信息Node13width - (ht.Default.getTextSize('有功功率', ' '+ Lib_风场信息Node13fontSize + 'px "Arial"').width + 6)) * 0.5;
  781. } else if (Lib_风场信息Node13align === 'center') {
  782. Lib_风场信息Node13textStart = -3;
  783. Lib_风场信息Node13textWidth = Lib_风场信息Node13width;
  784. Lib_风场信息Node13lineStart = Lib_风场信息Node13width - ht.Default.getTextSize('有功功率', ' '+ Lib_风场信息Node13fontSize + 'px "Arial"').width - 11;
  785. }
  786. })();
  787. Lib_风场信息Node13.setImage(GD.getTextJSON(Lib_风场信息Node13width, Lib_风场信息Node13height, true, false, false, ' '+ Lib_风场信息Node13fontSize + 'px "Arial"'))
  788. Lib_风场信息Node13.setPosition(32*ratio.ratioX, 127*ratio.ratioY);
  789. Lib_风场信息Node13.setWidth(Lib_风场信息Node13width);
  790. Lib_风场信息Node13.setHeight(Lib_风场信息Node13height);
  791. Lib_风场信息Node13._nodeType = 'text';
  792. Lib_风场信息Node13._disallowEvert = true;
  793. Lib_风场信息Node13.setRotation(0*Math.PI/180);
  794. Lib_风场信息Node13.a('node.width', Lib_风场信息Node13width);
  795. Lib_风场信息Node13.a('node.height', Lib_风场信息Node13height);
  796. Lib_风场信息Node13.a('node.rect', [0, 0, Lib_风场信息Node13width, Lib_风场信息Node13height]);
  797. Lib_风场信息Node13.a('node.bordercolor','rgba(0,0,0,1)');
  798. Lib_风场信息Node13.a('node.borderwidth', 0);
  799. Lib_风场信息Node13.a('node.background','' || 'rgba(0,0,0,0)');
  800. Lib_风场信息Node13.a('node.gradient','');
  801. Lib_风场信息Node13.a('node.gradientcolor','');
  802. Lib_风场信息Node13.a('node.text','有功功率');
  803. Lib_风场信息Node13.a('node.textalign','left');
  804. Lib_风场信息Node13.a('node.textvAlign','middle');
  805. Lib_风场信息Node13.a('node.textrect', [Lib_风场信息Node13textStart, 0, Lib_风场信息Node13textWidth, Lib_风场信息Node13height]);
  806. Lib_风场信息Node13.a('node.color','rgba(0,0,0,1)');
  807. Lib_风场信息Node13.a('node.font',' '+ Lib_风场信息Node13fontSize + 'px "Arial"');
  808. Lib_风场信息Node13.a('node.textvisible',true);
  809. Lib_风场信息Node13.a('node.linefeed',false);
  810. if (false) {
  811. Lib_风场信息Node13.a('node.textfunc',function(g) {
  812. g.beginPath();
  813. var str=Lib_风场信息Node13.a('node.text') || '有功功率';
  814. var color=Lib_风场信息Node13.a('node.color') || 'rgba(0,0,0,1)';
  815. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node13width,Lib_风场信息Node13height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node13fontSize + 'px "Arial"', 0,g);
  816. });
  817. }
  818. if (false) {
  819. Lib_风场信息Node13.a('node.underlinepoints',[Lib_风场信息Node13lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node13fontSize + 2 , ht.Default.getTextSize('有功功率', ' '+ Lib_风场信息Node13fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node13height - Lib_风场信息Node13fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node13fontSize + 2 ]);
  820. Lib_风场信息Node13.a('node.underlinevisible',false);
  821. Lib_风场信息Node13.a('node.underlineBorderWidth', 1);
  822. }
  823. dataModel.add(Lib_风场信息Node13);
  824. zoomNodeList.push({
  825. node: Lib_风场信息Node13,
  826. borderWidth: 0,
  827. attr: 'node.borderwidth'
  828. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  829. var Lib_风场信息Node14 = new ht.Node();
  830. var Lib_风场信息Node14textStart, Lib_风场信息Node14textWidth, Lib_风场信息Node14lineStart, Lib_风场信息Node14align = 'left', Lib_风场信息Node14fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node14width = 7*_ratio.ratioX, Lib_风场信息Node14height = 13*_ratio.ratioY;
  831. (function () {
  832. if (Lib_风场信息Node14align === 'left') {
  833. Lib_风场信息Node14textStart = Lib_风场信息Node14fontSize * 0.2 > 2 ? Lib_风场信息Node14fontSize * 0.2 - 4 : Lib_风场信息Node14fontSize * 0.2 - 9;
  834. Lib_风场信息Node14textWidth = Lib_风场信息Node14width;
  835. Lib_风场信息Node14lineStart = 1;
  836. } else if (Lib_风场信息Node14align === 'right') {
  837. Lib_风场信息Node14textStart = 0;
  838. Lib_风场信息Node14textWidth =Lib_风场信息Node14fontSize <= 8 ? Lib_风场信息Node14width + Lib_风场信息Node14fontSize * 0.2 + 6 : Lib_风场信息Node14width - Lib_风场信息Node14fontSize * 0.2;
  839. Lib_风场信息Node14lineStart = (Lib_风场信息Node14width - (ht.Default.getTextSize('-', ' '+ Lib_风场信息Node14fontSize + 'px "Arial"').width + 6)) * 0.5;
  840. } else if (Lib_风场信息Node14align === 'center') {
  841. Lib_风场信息Node14textStart = -3;
  842. Lib_风场信息Node14textWidth = Lib_风场信息Node14width;
  843. Lib_风场信息Node14lineStart = Lib_风场信息Node14width - ht.Default.getTextSize('-', ' '+ Lib_风场信息Node14fontSize + 'px "Arial"').width - 11;
  844. }
  845. })();
  846. Lib_风场信息Node14.setImage(GD.getTextJSON(Lib_风场信息Node14width, Lib_风场信息Node14height, true, false, false, ' '+ Lib_风场信息Node14fontSize + 'px "Arial"'))
  847. Lib_风场信息Node14.setPosition(74*ratio.ratioX, 127*ratio.ratioY);
  848. Lib_风场信息Node14.setWidth(Lib_风场信息Node14width);
  849. Lib_风场信息Node14.setHeight(Lib_风场信息Node14height);
  850. Lib_风场信息Node14._nodeType = 'text';
  851. Lib_风场信息Node14._disallowEvert = true;
  852. Lib_风场信息Node14.setRotation(0*Math.PI/180);
  853. Lib_风场信息Node14.a('node.width', Lib_风场信息Node14width);
  854. Lib_风场信息Node14.a('node.height', Lib_风场信息Node14height);
  855. Lib_风场信息Node14.a('node.rect', [0, 0, Lib_风场信息Node14width, Lib_风场信息Node14height]);
  856. Lib_风场信息Node14.a('node.bordercolor','rgba(192,0,0,1)');
  857. Lib_风场信息Node14.a('node.borderwidth', 0);
  858. Lib_风场信息Node14.a('node.background','' || 'rgba(0,0,0,0)');
  859. Lib_风场信息Node14.a('node.gradient','');
  860. Lib_风场信息Node14.a('node.gradientcolor','');
  861. Lib_风场信息Node14.a('node.text','-');
  862. Lib_风场信息Node14.a('node.textalign','left');
  863. Lib_风场信息Node14.a('node.textvAlign','middle');
  864. Lib_风场信息Node14.a('node.textrect', [Lib_风场信息Node14textStart, 0, Lib_风场信息Node14textWidth, Lib_风场信息Node14height]);
  865. Lib_风场信息Node14.a('node.color','rgba(192,0,0,1)');
  866. Lib_风场信息Node14.a('node.font',' '+ Lib_风场信息Node14fontSize + 'px "Arial"');
  867. Lib_风场信息Node14.a('node.textvisible',true);
  868. Lib_风场信息Node14.a('node.linefeed',false);
  869. if (false) {
  870. Lib_风场信息Node14.a('node.textfunc',function(g) {
  871. g.beginPath();
  872. var str=Lib_风场信息Node14.a('node.text') || '-';
  873. var color=Lib_风场信息Node14.a('node.color') || 'rgba(192,0,0,1)';
  874. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node14width,Lib_风场信息Node14height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node14fontSize + 'px "Arial"', 0,g);
  875. });
  876. }
  877. if (false) {
  878. Lib_风场信息Node14.a('node.underlinepoints',[Lib_风场信息Node14lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node14fontSize + 2 , ht.Default.getTextSize('-', ' '+ Lib_风场信息Node14fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node14height - Lib_风场信息Node14fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node14fontSize + 2 ]);
  879. Lib_风场信息Node14.a('node.underlinevisible',false);
  880. Lib_风场信息Node14.a('node.underlineBorderWidth', 1);
  881. }
  882. dataModel.add(Lib_风场信息Node14);
  883. zoomNodeList.push({
  884. node: Lib_风场信息Node14,
  885. borderWidth: 0,
  886. attr: 'node.borderwidth'
  887. }); _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  888. var Lib_风场信息Node15 = new ht.Node();
  889. var Lib_风场信息Node15textStart, Lib_风场信息Node15textWidth, Lib_风场信息Node15lineStart, Lib_风场信息Node15align = 'left', Lib_风场信息Node15fontSize = 10.66664*_ratio.ratioY,Lib_风场信息Node15width = 35*_ratio.ratioX, Lib_风场信息Node15height = 13*_ratio.ratioY;
  890. (function () {
  891. if (Lib_风场信息Node15align === 'left') {
  892. Lib_风场信息Node15textStart = Lib_风场信息Node15fontSize * 0.2 > 2 ? Lib_风场信息Node15fontSize * 0.2 - 4 : Lib_风场信息Node15fontSize * 0.2 - 9;
  893. Lib_风场信息Node15textWidth = Lib_风场信息Node15width;
  894. Lib_风场信息Node15lineStart = 1;
  895. } else if (Lib_风场信息Node15align === 'right') {
  896. Lib_风场信息Node15textStart = 0;
  897. Lib_风场信息Node15textWidth =Lib_风场信息Node15fontSize <= 8 ? Lib_风场信息Node15width + Lib_风场信息Node15fontSize * 0.2 + 6 : Lib_风场信息Node15width - Lib_风场信息Node15fontSize * 0.2;
  898. Lib_风场信息Node15lineStart = (Lib_风场信息Node15width - (ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node15fontSize + 'px "Arial"').width + 6)) * 0.5;
  899. } else if (Lib_风场信息Node15align === 'center') {
  900. Lib_风场信息Node15textStart = -3;
  901. Lib_风场信息Node15textWidth = Lib_风场信息Node15width;
  902. Lib_风场信息Node15lineStart = Lib_风场信息Node15width - ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node15fontSize + 'px "Arial"').width - 11;
  903. }
  904. })();
  905. Lib_风场信息Node15.setImage(GD.getTextJSON(Lib_风场信息Node15width, Lib_风场信息Node15height, true, false, false, ' '+ Lib_风场信息Node15fontSize + 'px "Arial"'))
  906. Lib_风场信息Node15.setPosition(124*ratio.ratioX, 127*ratio.ratioY);
  907. Lib_风场信息Node15.setWidth(Lib_风场信息Node15width);
  908. Lib_风场信息Node15.setHeight(Lib_风场信息Node15height);
  909. Lib_风场信息Node15._nodeType = 'text';
  910. Lib_风场信息Node15._disallowEvert = true;
  911. Lib_风场信息Node15.setRotation(0*Math.PI/180);
  912. Lib_风场信息Node15.a('node.width', Lib_风场信息Node15width);
  913. Lib_风场信息Node15.a('node.height', Lib_风场信息Node15height);
  914. Lib_风场信息Node15.a('node.rect', [0, 0, Lib_风场信息Node15width, Lib_风场信息Node15height]);
  915. Lib_风场信息Node15.a('node.bordercolor','rgba(0,0,0,1)');
  916. Lib_风场信息Node15.a('node.borderwidth', 0);
  917. Lib_风场信息Node15.a('node.background','' || 'rgba(0,0,0,0)');
  918. Lib_风场信息Node15.a('node.gradient','');
  919. Lib_风场信息Node15.a('node.gradientcolor','');
  920. Lib_风场信息Node15.a('node.text','万kwh');
  921. Lib_风场信息Node15.a('node.textalign','left');
  922. Lib_风场信息Node15.a('node.textvAlign','middle');
  923. Lib_风场信息Node15.a('node.textrect', [Lib_风场信息Node15textStart, 0, Lib_风场信息Node15textWidth, Lib_风场信息Node15height]);
  924. Lib_风场信息Node15.a('node.color','rgba(0,0,0,1)');
  925. Lib_风场信息Node15.a('node.font',' '+ Lib_风场信息Node15fontSize + 'px "Arial"');
  926. Lib_风场信息Node15.a('node.textvisible',true);
  927. Lib_风场信息Node15.a('node.linefeed',false);
  928. if (false) {
  929. Lib_风场信息Node15.a('node.textfunc',function(g) {
  930. g.beginPath();
  931. var str=Lib_风场信息Node15.a('node.text') || '万kwh';
  932. var color=Lib_风场信息Node15.a('node.color') || 'rgba(0,0,0,1)';
  933. canvasTextAutoLine(str,0,10.66664*0.5*_ratio.ratioY,Lib_风场信息Node15width,Lib_风场信息Node15height,10.66664*_ratio.ratioY,"left",color,' '+ Lib_风场信息Node15fontSize + 'px "Arial"', 0,g);
  934. });
  935. }
  936. if (false) {
  937. Lib_风场信息Node15.a('node.underlinepoints',[Lib_风场信息Node15lineStart, (13 - 10.66664) * 0.5 * _ratio.ratioY + Lib_风场信息Node15fontSize + 2 , ht.Default.getTextSize('万kwh', ' '+ Lib_风场信息Node15fontSize + 'px "Arial"').width + 6, (Lib_风场信息Node15height - Lib_风场信息Node15fontSize) * 0.5*_ratio.ratioY + Lib_风场信息Node15fontSize + 2 ]);
  938. Lib_风场信息Node15.a('node.underlinevisible',false);
  939. Lib_风场信息Node15.a('node.underlineBorderWidth', 1);
  940. }
  941. dataModel.add(Lib_风场信息Node15);
  942. zoomNodeList.push({
  943. node: Lib_风场信息Node15,
  944. borderWidth: 0,
  945. attr: 'node.borderwidth'
  946. });
  947. /*@GraphList@*/
  948. /*@PageInit@*/
  949. var localVarObj = this.localVarObj;
  950. var localDynamicVarObj = this.localDynamicVar();
  951. var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu;
  952. var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang;
  953. var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu;
  954. var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang;
  955. var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv;
  956. this['Lib_风场信息Node0'] = Lib_风场信息Node0;
  957. Lib_风场信息Node0.__parentLib = nodename;
  958. Lib_风场信息Node0.__parent = this;
  959. this.childNodes.push(Lib_风场信息Node0);
  960. this['Lib_风场信息Node1'] = Lib_风场信息Node1;
  961. Lib_风场信息Node1.__parentLib = nodename;
  962. Lib_风场信息Node1.__parent = this;
  963. this.childNodes.push(Lib_风场信息Node1);
  964. this['Lib_风场信息Node2'] = Lib_风场信息Node2;
  965. Lib_风场信息Node2.__parentLib = nodename;
  966. Lib_风场信息Node2.__parent = this;
  967. this.childNodes.push(Lib_风场信息Node2);
  968. this['Lib_风场信息Node3'] = Lib_风场信息Node3;
  969. Lib_风场信息Node3.__parentLib = nodename;
  970. Lib_风场信息Node3.__parent = this;
  971. this.childNodes.push(Lib_风场信息Node3);
  972. this['Lib_风场信息Node4'] = Lib_风场信息Node4;
  973. Lib_风场信息Node4.__parentLib = nodename;
  974. Lib_风场信息Node4.__parent = this;
  975. this.childNodes.push(Lib_风场信息Node4);
  976. this['Lib_风场信息Node5'] = Lib_风场信息Node5;
  977. Lib_风场信息Node5.__parentLib = nodename;
  978. Lib_风场信息Node5.__parent = this;
  979. this.childNodes.push(Lib_风场信息Node5);
  980. this['Lib_风场信息Node6'] = Lib_风场信息Node6;
  981. Lib_风场信息Node6.__parentLib = nodename;
  982. Lib_风场信息Node6.__parent = this;
  983. this.childNodes.push(Lib_风场信息Node6);
  984. this['Lib_风场信息Node7'] = Lib_风场信息Node7;
  985. Lib_风场信息Node7.__parentLib = nodename;
  986. Lib_风场信息Node7.__parent = this;
  987. this.childNodes.push(Lib_风场信息Node7);
  988. this['Lib_风场信息Node8'] = Lib_风场信息Node8;
  989. Lib_风场信息Node8.__parentLib = nodename;
  990. Lib_风场信息Node8.__parent = this;
  991. this.childNodes.push(Lib_风场信息Node8);
  992. this['Lib_风场信息Node9'] = Lib_风场信息Node9;
  993. Lib_风场信息Node9.__parentLib = nodename;
  994. Lib_风场信息Node9.__parent = this;
  995. this.childNodes.push(Lib_风场信息Node9);
  996. this['Lib_风场信息Node10'] = Lib_风场信息Node10;
  997. Lib_风场信息Node10.__parentLib = nodename;
  998. Lib_风场信息Node10.__parent = this;
  999. this.childNodes.push(Lib_风场信息Node10);
  1000. this['Lib_风场信息Node11'] = Lib_风场信息Node11;
  1001. Lib_风场信息Node11.__parentLib = nodename;
  1002. Lib_风场信息Node11.__parent = this;
  1003. this.childNodes.push(Lib_风场信息Node11);
  1004. this['Lib_风场信息Node12'] = Lib_风场信息Node12;
  1005. Lib_风场信息Node12.__parentLib = nodename;
  1006. Lib_风场信息Node12.__parent = this;
  1007. this.childNodes.push(Lib_风场信息Node12);
  1008. this['Lib_风场信息Node13'] = Lib_风场信息Node13;
  1009. Lib_风场信息Node13.__parentLib = nodename;
  1010. Lib_风场信息Node13.__parent = this;
  1011. this.childNodes.push(Lib_风场信息Node13);
  1012. this['Lib_风场信息Node14'] = Lib_风场信息Node14;
  1013. Lib_风场信息Node14.__parentLib = nodename;
  1014. Lib_风场信息Node14.__parent = this;
  1015. this.childNodes.push(Lib_风场信息Node14);
  1016. this['Lib_风场信息Node15'] = Lib_风场信息Node15;
  1017. Lib_风场信息Node15.__parentLib = nodename;
  1018. Lib_风场信息Node15.__parent = this;
  1019. this.childNodes.push(Lib_风场信息Node15);
  1020. /*@ControlContextMenu@*/
  1021. /*@Declare@*/
  1022. this.init(x, y, width, height, angle);
  1023. };
  1024. ht.Default.def('ht.lib.风场信息', Object, {
  1025. refresh10ms: function () {
  1026. var localVarObj = this.localVarObj;
  1027. var localDynamicVarObj = this.localDynamicVar();
  1028. var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu;
  1029. var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang;
  1030. var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu;
  1031. var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang;
  1032. var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv;
  1033. var Lib_风场信息Node0= this.Lib_风场信息Node0;
  1034. var Lib_风场信息Node1= this.Lib_风场信息Node1;
  1035. var Lib_风场信息Node2= this.Lib_风场信息Node2;
  1036. var Lib_风场信息Node3= this.Lib_风场信息Node3;
  1037. var Lib_风场信息Node4= this.Lib_风场信息Node4;
  1038. var Lib_风场信息Node5= this.Lib_风场信息Node5;
  1039. var Lib_风场信息Node6= this.Lib_风场信息Node6;
  1040. var Lib_风场信息Node7= this.Lib_风场信息Node7;
  1041. var Lib_风场信息Node8= this.Lib_风场信息Node8;
  1042. var Lib_风场信息Node9= this.Lib_风场信息Node9;
  1043. var Lib_风场信息Node10= this.Lib_风场信息Node10;
  1044. var Lib_风场信息Node11= this.Lib_风场信息Node11;
  1045. var Lib_风场信息Node12= this.Lib_风场信息Node12;
  1046. var Lib_风场信息Node13= this.Lib_风场信息Node13;
  1047. var Lib_风场信息Node14= this.Lib_风场信息Node14;
  1048. var Lib_风场信息Node15= this.Lib_风场信息Node15;
  1049. /*@refresh10ms@*/
  1050. },
  1051. refresh100ms: function () {
  1052. var localVarObj = this.localVarObj;
  1053. var localDynamicVarObj = this.localDynamicVar();
  1054. var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu;
  1055. var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang;
  1056. var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu;
  1057. var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang;
  1058. var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv;
  1059. var Lib_风场信息Node0= this.Lib_风场信息Node0;
  1060. var Lib_风场信息Node1= this.Lib_风场信息Node1;
  1061. var Lib_风场信息Node2= this.Lib_风场信息Node2;
  1062. var Lib_风场信息Node3= this.Lib_风场信息Node3;
  1063. var Lib_风场信息Node4= this.Lib_风场信息Node4;
  1064. var Lib_风场信息Node5= this.Lib_风场信息Node5;
  1065. var Lib_风场信息Node6= this.Lib_风场信息Node6;
  1066. var Lib_风场信息Node7= this.Lib_风场信息Node7;
  1067. var Lib_风场信息Node8= this.Lib_风场信息Node8;
  1068. var Lib_风场信息Node9= this.Lib_风场信息Node9;
  1069. var Lib_风场信息Node10= this.Lib_风场信息Node10;
  1070. var Lib_风场信息Node11= this.Lib_风场信息Node11;
  1071. var Lib_风场信息Node12= this.Lib_风场信息Node12;
  1072. var Lib_风场信息Node13= this.Lib_风场信息Node13;
  1073. var Lib_风场信息Node14= this.Lib_风场信息Node14;
  1074. var Lib_风场信息Node15= this.Lib_风场信息Node15;
  1075. Lib_风场信息Node2.a('node.text',GetDital((getVarValue(fengjitaishu) ),-1));
  1076. Lib_风场信息Node5.a('node.text',GetDital((getVarValue(zhuangjirongliang) ),-1));
  1077. Lib_风场信息Node8.a('node.text',GetDital((getVarValue(pingjunfengsu) ),-1));
  1078. Lib_风场信息Node11.a('node.text',GetDital((getVarValue(rifadianliang) ),-1));
  1079. Lib_风场信息Node14.a('node.text',GetDital((getVarValue(yougonggonglv) ),-1));
  1080. /*@refresh100ms@*/
  1081. },
  1082. refresh500ms: function () {
  1083. var localVarObj = this.localVarObj;
  1084. var localDynamicVarObj = this.localDynamicVar();
  1085. var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu;
  1086. var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang;
  1087. var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu;
  1088. var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang;
  1089. var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv;
  1090. var Lib_风场信息Node0= this.Lib_风场信息Node0;
  1091. var Lib_风场信息Node1= this.Lib_风场信息Node1;
  1092. var Lib_风场信息Node2= this.Lib_风场信息Node2;
  1093. var Lib_风场信息Node3= this.Lib_风场信息Node3;
  1094. var Lib_风场信息Node4= this.Lib_风场信息Node4;
  1095. var Lib_风场信息Node5= this.Lib_风场信息Node5;
  1096. var Lib_风场信息Node6= this.Lib_风场信息Node6;
  1097. var Lib_风场信息Node7= this.Lib_风场信息Node7;
  1098. var Lib_风场信息Node8= this.Lib_风场信息Node8;
  1099. var Lib_风场信息Node9= this.Lib_风场信息Node9;
  1100. var Lib_风场信息Node10= this.Lib_风场信息Node10;
  1101. var Lib_风场信息Node11= this.Lib_风场信息Node11;
  1102. var Lib_风场信息Node12= this.Lib_风场信息Node12;
  1103. var Lib_风场信息Node13= this.Lib_风场信息Node13;
  1104. var Lib_风场信息Node14= this.Lib_风场信息Node14;
  1105. var Lib_风场信息Node15= this.Lib_风场信息Node15;
  1106. /*@refresh500ms@*/
  1107. },
  1108. refresh1s: function () {
  1109. var Counter1s = arguments[0] || 0;
  1110. var localVarObj = this.localVarObj;
  1111. var localDynamicVarObj = this.localDynamicVar();
  1112. var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu;
  1113. var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang;
  1114. var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu;
  1115. var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang;
  1116. var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv;
  1117. var Lib_风场信息Node0= this.Lib_风场信息Node0;
  1118. var Lib_风场信息Node1= this.Lib_风场信息Node1;
  1119. var Lib_风场信息Node2= this.Lib_风场信息Node2;
  1120. var Lib_风场信息Node3= this.Lib_风场信息Node3;
  1121. var Lib_风场信息Node4= this.Lib_风场信息Node4;
  1122. var Lib_风场信息Node5= this.Lib_风场信息Node5;
  1123. var Lib_风场信息Node6= this.Lib_风场信息Node6;
  1124. var Lib_风场信息Node7= this.Lib_风场信息Node7;
  1125. var Lib_风场信息Node8= this.Lib_风场信息Node8;
  1126. var Lib_风场信息Node9= this.Lib_风场信息Node9;
  1127. var Lib_风场信息Node10= this.Lib_风场信息Node10;
  1128. var Lib_风场信息Node11= this.Lib_风场信息Node11;
  1129. var Lib_风场信息Node12= this.Lib_风场信息Node12;
  1130. var Lib_风场信息Node13= this.Lib_风场信息Node13;
  1131. var Lib_风场信息Node14= this.Lib_风场信息Node14;
  1132. var Lib_风场信息Node15= this.Lib_风场信息Node15;
  1133. /*@refresh1s@*/
  1134. },
  1135. refresh5s: function () {
  1136. var localVarObj = this.localVarObj;
  1137. var localDynamicVarObj = this.localDynamicVar();
  1138. var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu;
  1139. var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang;
  1140. var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu;
  1141. var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang;
  1142. var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv;
  1143. var Lib_风场信息Node0= this.Lib_风场信息Node0;
  1144. var Lib_风场信息Node1= this.Lib_风场信息Node1;
  1145. var Lib_风场信息Node2= this.Lib_风场信息Node2;
  1146. var Lib_风场信息Node3= this.Lib_风场信息Node3;
  1147. var Lib_风场信息Node4= this.Lib_风场信息Node4;
  1148. var Lib_风场信息Node5= this.Lib_风场信息Node5;
  1149. var Lib_风场信息Node6= this.Lib_风场信息Node6;
  1150. var Lib_风场信息Node7= this.Lib_风场信息Node7;
  1151. var Lib_风场信息Node8= this.Lib_风场信息Node8;
  1152. var Lib_风场信息Node9= this.Lib_风场信息Node9;
  1153. var Lib_风场信息Node10= this.Lib_风场信息Node10;
  1154. var Lib_风场信息Node11= this.Lib_风场信息Node11;
  1155. var Lib_风场信息Node12= this.Lib_风场信息Node12;
  1156. var Lib_风场信息Node13= this.Lib_风场信息Node13;
  1157. var Lib_风场信息Node14= this.Lib_风场信息Node14;
  1158. var Lib_风场信息Node15= this.Lib_风场信息Node15;
  1159. /*@refresh5s@*/
  1160. },
  1161. /*@PageDynamic@*/
  1162. onEvent: function (e, data, type, origin, offset, objMouseOn, ctm) {
  1163. var localVarObj = this.localVarObj;
  1164. var localDynamicVarObj = this.localDynamicVar();
  1165. var fengjitaishu= localVarObj.fengjitaishu || localDynamicVarObj.fengjitaishu;
  1166. var zhuangjirongliang= localVarObj.zhuangjirongliang || localDynamicVarObj.zhuangjirongliang;
  1167. var pingjunfengsu= localVarObj.pingjunfengsu || localDynamicVarObj.pingjunfengsu;
  1168. var rifadianliang= localVarObj.rifadianliang || localDynamicVarObj.rifadianliang;
  1169. var yougonggonglv= localVarObj.yougonggonglv || localDynamicVarObj.yougonggonglv;
  1170. var Lib_风场信息Node0= this.Lib_风场信息Node0;
  1171. var Lib_风场信息Node1= this.Lib_风场信息Node1;
  1172. var Lib_风场信息Node2= this.Lib_风场信息Node2;
  1173. var Lib_风场信息Node3= this.Lib_风场信息Node3;
  1174. var Lib_风场信息Node4= this.Lib_风场信息Node4;
  1175. var Lib_风场信息Node5= this.Lib_风场信息Node5;
  1176. var Lib_风场信息Node6= this.Lib_风场信息Node6;
  1177. var Lib_风场信息Node7= this.Lib_风场信息Node7;
  1178. var Lib_风场信息Node8= this.Lib_风场信息Node8;
  1179. var Lib_风场信息Node9= this.Lib_风场信息Node9;
  1180. var Lib_风场信息Node10= this.Lib_风场信息Node10;
  1181. var Lib_风场信息Node11= this.Lib_风场信息Node11;
  1182. var Lib_风场信息Node12= this.Lib_风场信息Node12;
  1183. var Lib_风场信息Node13= this.Lib_风场信息Node13;
  1184. var Lib_风场信息Node14= this.Lib_风场信息Node14;
  1185. var Lib_风场信息Node15= this.Lib_风场信息Node15;
  1186. if (type === 'click') {
  1187. /*@EvnentClicked@*/
  1188. } else if (type === 'mousedown') {
  1189. mouseX=e.clientX;
  1190. mouseY=e.clientY;
  1191. /*@EvnentMouseDown@*/
  1192. } else if (type === 'mouseup') {
  1193. /*@EvnentMouseUp@*/
  1194. } else if (type === 'mousemove') {
  1195. var mouseX, mouseY, position, zoom;
  1196. position=origin.getLogicalPoint(e);
  1197. zoom = graphView.getZoom();
  1198. if (origin === graphView) {
  1199. mouseX= position.x + origin.tx();
  1200. mouseY = position.y + origin.ty();
  1201. } else {
  1202. offset = offset || {x: 0, y: 0};
  1203. mouseX = position.x / zoom + offset.x + origin.tx();
  1204. mouseY = position.y / zoom + offset.y + origin.ty();
  1205. }
  1206. /*@EvnentMouseLeave@*/
  1207. /*@EvnentMouseOver@*/
  1208. } else if (type === 'keydown') {
  1209. /*@EvnentKeyDown@*/
  1210. } else if (type === 'contextmenu') {
  1211. /*@Declare@*/
  1212. /*@SetNodeContextMenu@*/
  1213. /*@SetPageContextMenu@*/
  1214. }
  1215. /*@LibEvent@*/
  1216. },
  1217. getBaseClass: function () {
  1218. return this._baseClass;
  1219. },
  1220. getWidth: function () {
  1221. return this._width;
  1222. },
  1223. getHeight: function () {
  1224. return this._height;
  1225. },
  1226. getSize: function () {
  1227. return {
  1228. width: this._width,
  1229. height: this._height
  1230. }
  1231. },
  1232. setWidth: function (width) {
  1233. if (width === undefined || width === null || width != width) {
  1234. return ;
  1235. }
  1236. var originWidth = this._width;
  1237. var ratio = width / originWidth;
  1238. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), w, cw, ox, rotation = this.getRotation();
  1239. for (var i = 0, len = childNodes.length; i < len; i++) {
  1240. childNode = childNodes[i];
  1241. p = childNode.getPosition();
  1242. cw = childNode.getWidth();
  1243. w = cw >=2 ? cw * ratio : cw;
  1244. childNode.setWidth(w);
  1245. ox = op.x + (p.x - op.x) * ratio;
  1246. childNode.setPosition(ox, p.y);
  1247. rotation = GD.calcRotation(rotation);
  1248. if (rotation === 0 || rotation === Math.PI) {
  1249. // 图元未旋转
  1250. ox = op.x + (p.x - op.x)*ratio;
  1251. childNode.setPosition(ox, p.y);
  1252. } else if (rotation === 90 * Math.PI / 180) {
  1253. // 图元旋转以后
  1254. ox = op.y + (p.y - op.y)*ratio;
  1255. childNode.setPosition(p.x, ox);
  1256. }
  1257. }
  1258. this._width = width;
  1259. this._originWidth = width;
  1260. this._ratioX = ratio;
  1261. return this;
  1262. },
  1263. setHeight: function (height) {
  1264. if (height === undefined || height === null || height != height) {
  1265. return ;
  1266. }
  1267. var originHeight = this._height;
  1268. var ratio = height / originHeight;
  1269. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), h, ch, oy, rotation = this.getRotation();
  1270. for (var i = 0, len = childNodes.length; i < len; i++) {
  1271. childNode = childNodes[i];
  1272. p = childNode.getPosition();
  1273. ch = childNode.getHeight();
  1274. h = ch >=2 ? ch * ratio : ch;
  1275. childNode.setHeight(h);
  1276. rotation = GD.calcRotation(rotation);
  1277. if (rotation === 0 || rotation === Math.PI) {
  1278. // 图元未旋转
  1279. oy = op.y + (p.y - op.y)*ratio;
  1280. childNode.setPosition(p.x, oy);
  1281. } else if (rotation === 90 * Math.PI / 180) {
  1282. // 图元旋转以后
  1283. oy = op.x + (p.x - op.x)*ratio;
  1284. childNode.setPosition(oy, p.y);
  1285. }
  1286. }
  1287. this._height = height;
  1288. this._originHeight = height;
  1289. this._ratioY = ratio;
  1290. return this;
  1291. },
  1292. setSize: function (size) {
  1293. // var args = Array.prototype.slice.call(arguments, 0);
  1294. // var height, width;
  1295. // if (args.length === 0) {
  1296. // return ;
  1297. // }else if (args.length === 1) {
  1298. // height = args[0].height;
  1299. // width = args[0].width;
  1300. // } else {
  1301. // width = args[0];
  1302. // height = args[1];
  1303. // }
  1304. // var wh = GD.getRatioWithRotation(angle, wid)
  1305. // this.setHeight(height);
  1306. // this.setWidth(width);
  1307. // return this;
  1308. var args = Array.prototype.slice.call(arguments, 0);
  1309. var height, width;
  1310. if (args.length === 0) {
  1311. return ;
  1312. }else if (args.length === 1) {
  1313. height = args[0].height;
  1314. width = args[0].width;
  1315. angle = 0;
  1316. } else if (args.length === 2) {
  1317. if (typeof args[0] === 'object') {
  1318. width = args[0].width;
  1319. height = args[0].height;
  1320. angle = args[1] || 0;
  1321. } else {
  1322. width = args[0];
  1323. height = args[1];
  1324. angle = 0;
  1325. }
  1326. } else if (args.length === 3) {
  1327. width = args[0];
  1328. height = args[1];
  1329. angle = args[2] || 0;
  1330. }
  1331. var wh = GD.getRatioWithRotation(0, width, height);
  1332. this.setHeight(wh.ratioY);
  1333. this.setWidth(wh.ratioX);
  1334. return this;
  1335. },
  1336. getPosition: function () {
  1337. return {
  1338. x: this._x,
  1339. y: this._y
  1340. }
  1341. },
  1342. setPosition: function () {
  1343. var args = Array.prototype.slice.call(arguments, 0), x, y;
  1344. if (args.length === 0) {
  1345. return this;
  1346. } else if (args.length === 1) {
  1347. if (typeof args[0] != 'object') {
  1348. return this;
  1349. }
  1350. x = args[0].x;
  1351. y = args[0].y;
  1352. } else {
  1353. x = args[0];
  1354. y = args[1];
  1355. }
  1356. if ((x !== 0 && !x) || (y !== 0 && !y)) {
  1357. return this;
  1358. }
  1359. // var childNodes = this.childNodes, offset, childNode, p;
  1360. // for (var i = 0, len = childNodes.length; i < len; i++) {
  1361. // childNode = childNodes[i];
  1362. // p = childNode.getPosition();
  1363. // childNode.setPosition(x - (this._x-p.x)*this._ratioX, y - (this._y-p.y)*this._ratioY);
  1364. // }
  1365. // this._x = x;
  1366. // this._y = y;
  1367. // return this;
  1368. var childNodes, childNode, background, offset = {}, op, cp;
  1369. childNodes = this.childNodes;
  1370. background = this._background;
  1371. op = background.getPosition();
  1372. offset.x = x - op.x;
  1373. offset.y = y - op.y;
  1374. for (var i = 0, len = childNodes.length; i < len; i++) {
  1375. childNode = childNodes[i];
  1376. cp = childNode.getPosition();
  1377. childNode.setPosition(cp.x + offset.x, cp.y + offset.y);
  1378. }
  1379. this._x = x;
  1380. this._y = y;
  1381. this._position = {x: x, y: y};
  1382. return this;
  1383. },
  1384. getStyle: function (key) {
  1385. if (!key) {
  1386. return undefined;
  1387. }
  1388. return this._styleObject[key];
  1389. },
  1390. setStyle: function (key, value, force) {
  1391. var childNodes = this.childNodes, childNode;
  1392. for (var i = 0, len = childNodes.length; i < len; i++) {
  1393. childNode = childNodes[i];
  1394. if (key === '2d.visible') {
  1395. if (value === graphView.isVisible(childNode)) {
  1396. continue;
  1397. }
  1398. if (!value) {
  1399. childNode._savedIsVisible = graphView.isVisible(childNode);
  1400. childNode.s({
  1401. '2d.visible': false
  1402. })
  1403. } else {
  1404. childNode.s({
  1405. '2d.visible': childNode._savedIsVisible
  1406. })
  1407. }
  1408. continue;
  1409. }
  1410. childNode.s({
  1411. key: value
  1412. });
  1413. }
  1414. this._styleObject[key] = value;
  1415. return this;
  1416. },
  1417. calcSize: function () {
  1418. var background = this._background;
  1419. var position = background.getPosition(),
  1420. width = background.getWidth(),
  1421. height = background.getHeight();
  1422. this._width = width;
  1423. this._height = height;
  1424. this._x = position.x;
  1425. this._y = position.y;
  1426. this._position = {
  1427. x: this._x,
  1428. y: this._y
  1429. }
  1430. return this;
  1431. return this;
  1432. },
  1433. s: function (styleObj, force) {
  1434. var args = Array.prototype.slice.call(arguments, 0);
  1435. var styleObj;
  1436. if (args.length === 0) {
  1437. return this;
  1438. } else if (args.length === 1) {
  1439. styleObj = args[0];
  1440. } else {
  1441. this.setStyle(args[0], args[1]);
  1442. return this;
  1443. }
  1444. for (var key in styleObj) {
  1445. if (!styleObj.hasOwnProperty(key)) {
  1446. continue;
  1447. }
  1448. this.setStyle(key, styleObj[key], force);
  1449. }
  1450. return this;
  1451. },
  1452. init: function (x, y, width, height, angle) {
  1453. var that = this;
  1454. this.calcSize();
  1455. (function (width, height, angle) {
  1456. // that.setSize(width, height, angle);
  1457. // var wh = GD.getRatioWithRotation(angle, width, height);
  1458. // width = wh.ratioX;
  1459. // height = wh.ratioY;
  1460. var originHeight = that._height;
  1461. var originWidth = that._width;
  1462. var ratioY = height / originHeight;
  1463. var ratioX = width / originWidth;
  1464. var childNodes = that.childNodes,
  1465. childNode,p, op = that.getPosition(), h, ch, oy, w, cw, ox, name, borderRatio, borderWidth;
  1466. for (var i = 0, len = childNodes.length; i < len; i++) {
  1467. childNode = childNodes[i];
  1468. p = childNode.getPosition();
  1469. childNode.originHeight = childNode.originHeight || childNode.getHeight();
  1470. ch = childNode.getHeight();
  1471. cw = childNode.getWidth();
  1472. if (ch > 2) {
  1473. h = ch * ratioY;
  1474. childNode.setHeight(h);
  1475. }
  1476. if (cw > 2) {
  1477. w = cw * ratioX;
  1478. childNode.setWidth(w);
  1479. }
  1480. borderRatio = (ratioX + ratioY)*0.5;
  1481. if (childNode._nodeType === 'line') { // 如果是线,
  1482. if (childNode.getWidth() > childNode.getHeight()) {
  1483. borderRatio = ratioX;
  1484. } else {
  1485. borderRatio = ratioY;
  1486. }
  1487. }
  1488. name = childNode._nodename;
  1489. // if (childNode.borderWidth && name && ch > 2 && cw > 2) {
  1490. // borderWidth = childNode.borderWidth / borderRatio;
  1491. // if (borderWidth > ch*0.5 || borderWidth > cw *0.5) {
  1492. // // borderWidth = childNode.borderWidth;
  1493. // }
  1494. // childNode.borderWidth = borderWidth;
  1495. // childNode.a(name + '.borderwidth', borderWidth);
  1496. // }
  1497. }
  1498. that._height = height;
  1499. that._originHeight = height;
  1500. that._ratioY = ratioY;
  1501. that._width = width;
  1502. that._originWidth = width;
  1503. that._ratioX = ratioX;
  1504. })(width, height, angle);
  1505. that._x = width / 2;
  1506. that._y = height / 2;
  1507. that._rotation = 0;
  1508. // that.setPosition(x, y);
  1509. (function (x, y) {
  1510. var childNodes = that.childNodes, offset, childNode;
  1511. var w2 = that.getWidth() / 2, h2 = that.getHeight()/2;
  1512. for (var i = 0, len = childNodes.length; i < len; i++) {
  1513. childNode = childNodes[i];
  1514. offset = childNode.getPosition();
  1515. childNode.setPosition(x + offset.x * that._ratioX - w2, y + offset.y * that._ratioY - h2);
  1516. }
  1517. that._x = x;
  1518. that._y = y;
  1519. })(x, y);
  1520. // setTimeout(that.addEVent, 1000);
  1521. },
  1522. setRotation: function (angle) {
  1523. var that = this, _angle = that.getRotation();
  1524. if (angle!==0 && !angle || angle === _angle) {
  1525. return this;
  1526. }
  1527. var childNodes = this.childNodes, childNode, p = this.getPosition(), px = p.x, py = p.y;
  1528. for (var i = 0, len = childNodes.length; i < len; i++) {
  1529. childNode = childNodes[i];
  1530. var x = childNode.getPosition().x - px;
  1531. var y = childNode.getPosition().y - py;
  1532. childNode.setPosition(Math.cos(angle-_angle) * x - Math.sin(angle-_angle) * y + px, Math.cos(angle-_angle) * y + Math.sin(angle-_angle) * x + py);
  1533. childNode.setRotation(angle);
  1534. }
  1535. this._rotation = angle;
  1536. return this;
  1537. },
  1538. getRotation: function () {
  1539. return this._rotation;
  1540. },
  1541. setScale: function (sx, sy) {
  1542. var that = this,
  1543. childNodes = this.childNodes,
  1544. childNode;
  1545. if (sx === undefined || sx === null) return ;
  1546. if (sy === undefined || sy === null) {
  1547. sy = sx;
  1548. }
  1549. for (var i = 0, len = childNodes.length; i < len; i++) {
  1550. childNode = childNodes[i];
  1551. if (typeof childNode.setScale === 'function') {
  1552. childNode.setScale(sx, sy);
  1553. }
  1554. }
  1555. },
  1556. getScale: function () {
  1557. return this._background.getScale();
  1558. },
  1559. setScaleX: function (sx) {
  1560. if (sx === undefined || sx === null) return;
  1561. var that = this,
  1562. childNodes = this.childNodes,
  1563. childNode;
  1564. for (var i = 0, len = childNodes.length; i < len; i++) {
  1565. childNode = childNodes[i];
  1566. if (typeof childNode.setScaleX === 'function') {
  1567. childNode.setScaleX(sx);
  1568. }
  1569. }
  1570. },
  1571. setScaleY: function (sy) {
  1572. if (sy === undefined || sy === null) return;
  1573. var that = this,
  1574. childNodes = this.childNodes,
  1575. childNode;
  1576. for (var i = 0, len = childNodes.length; i < len; i++) {
  1577. childNode = childNodes[i];
  1578. if (typeof childNode.setScaleY === 'function') {
  1579. childNode.setScaleY(sy);
  1580. }
  1581. }
  1582. },
  1583. getScaleX: function () {
  1584. return this._background.getScaleX();
  1585. },
  1586. getScaleY: function () {
  1587. return this._background.getScaleY();
  1588. },
  1589. evert: function () {
  1590. var that = this,
  1591. childNodes = this.childNodes,
  1592. background = this._background,
  1593. bp = background.getPosition(),
  1594. bx = bp.x,
  1595. by = bp.y,
  1596. childNode, distanceX, distanceY, x, y, p, nx, ny;
  1597. for (var i = 0, len = childNodes.length; i < len; i++) {
  1598. childNode = childNodes[i];
  1599. p = childNode.getPosition();
  1600. x = p.x;
  1601. y = p.y;
  1602. distanceX = bx - x;
  1603. distanceY = by - y;
  1604. nx = bx + distanceX;
  1605. ny = by + distanceY;
  1606. childNode.setPosition(nx, ny);
  1607. if (typeof childNode.setScale === 'function') {
  1608. if (!(childNode._disallowEvert === true))
  1609. childNode.setScale(-1, -1);
  1610. }
  1611. }
  1612. },
  1613. evertX: function () {
  1614. var that = this,
  1615. childNodes = this.childNodes,
  1616. background = this._background,
  1617. bx = background.getPosition().x,
  1618. childNode, distance, x, p, nx;
  1619. for (var i = 0, len = childNodes.length; i < len; i++) {
  1620. childNode = childNodes[i];
  1621. p = childNode.getPosition();
  1622. x = p.x;
  1623. distance = bx - x;
  1624. nx = bx + distance;
  1625. childNode.setPosition(nx, p.y);
  1626. if (typeof childNode.setScaleX === 'function') {
  1627. if (!(childNode._disallowEvert === true))
  1628. childNode.setScaleX(-1);
  1629. }
  1630. }
  1631. },
  1632. evertY: function () {
  1633. var that = this,
  1634. childNodes = this.childNodes,
  1635. background = this._background,
  1636. by = background.getPosition().y,
  1637. childNode, distance, y, p, ny;
  1638. for (var i = 0, len = childNodes.length; i < len; i++) {
  1639. childNode = childNodes[i];
  1640. p = childNode.getPosition();
  1641. y = p.y;
  1642. distance = by - y;
  1643. ny = by + distance;
  1644. childNode.setPosition(p.x, ny);
  1645. if (typeof childNode.setScaleY === 'function') {
  1646. if (!(childNode._disallowEvert === true))
  1647. childNode.setScaleY(-1);
  1648. }
  1649. }
  1650. },
  1651. attr: function (key, value) {
  1652. var _attrObj = this._attrObj || {};
  1653. if (arguments.length === 1) {
  1654. return _attrObj[key];
  1655. }
  1656. var childNodes = this.childNodes, childNode;
  1657. _attrObj[key] = value;
  1658. for (var i = 0; childNode = childNodes[i++];) {
  1659. if (typeof childNode.a === 'function') {
  1660. childNode.a(key, value);
  1661. }
  1662. }
  1663. },
  1664. a: function () {
  1665. return this.attr.apply(this, arguments);
  1666. }
  1667. });
  1668. }