123.js 108 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780
  1. ht.lib = ht.lib || {};
  2. if (!ht.lib['123']) {
  3. ht.lib['123'] = function (x, y, width, height, angle, localVarObj, localDynamicVar, nodename) {
  4. _ratio = GD.getRatioWithRotation(0, ratio);
  5. ht.lib['123'].superClass.constructor.apply(this);
  6. this.localVarObj = localVarObj;
  7. this.localDynamicVar = localDynamicVar;
  8. this.childNodes = [];
  9. this._styleObject = {};
  10. this._originWidth = 85.12164*_ratio.ratioX;
  11. this._originHeight = 58*_ratio.ratioY;
  12. this._baseClass = "ht.lib.123";
  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_123Node0points=[27, 47,27, 57],
  36. Lib_123Node0rect=ht.Default.unionPoint([{x:27,y:47},{x:27,y:57}]),
  37. Lib_123Node0compspts=[];
  38. _ratio = GD.getRatioWithRotation(0, ratio);
  39. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  40. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  41. for(var i=0;i<Lib_123Node0points.length;i++){
  42. if(i%2==0){
  43. Lib_123Node0compspts.push(Lib_123Node0points[i]-Lib_123Node0rect.x);
  44. }else{
  45. Lib_123Node0compspts.push(Lib_123Node0points[i]-Lib_123Node0rect.y);
  46. }
  47. }
  48. var Lib_123Node0ptslength=Lib_123Node0compspts.length;
  49. if (Lib_123Node0rect.height === 0) {
  50. Lib_123Node0compspts[0] -= 0;
  51. Lib_123Node0compspts[Lib_123Node0ptslength-2] += 0;
  52. } else if (Lib_123Node0rect.width === 0){
  53. Lib_123Node0compspts[1] -= 0;
  54. Lib_123Node0compspts[Lib_123Node0ptslength-1] += 0;
  55. } else {
  56. Lib_123Node0compspts[0] -= 0;
  57. Lib_123Node0compspts[1] -= 0;
  58. Lib_123Node0compspts[Lib_123Node0ptslength-2] += 0;
  59. Lib_123Node0compspts[Lib_123Node0ptslength-1] += 0;
  60. }
  61. Lib_123Node0 = new ht.Node();
  62. Lib_123Node0.borderWidth = 1;
  63. Lib_123Node0rect.width = Lib_123Node0rect.width === 0 ? 0.0001 : Lib_123Node0rect.width;
  64. Lib_123Node0rect.height = Lib_123Node0rect.height === 0 ? 0.0001 : Lib_123Node0rect.height;
  65. var Lib_123Node0endCompspts = [Lib_123Node0compspts[Lib_123Node0ptslength-2],Lib_123Node0compspts[Lib_123Node0ptslength-1],0,0];
  66. var Lib_123Node0startCompspts = [Lib_123Node0compspts[0],Lib_123Node0compspts[1],0,0];
  67. Lib_123Node0.setImage(GD.getPolyLineJSON());
  68. Lib_123Node0.setPosition(Lib_123Node0rect.x+Lib_123Node0rect.width/2,Lib_123Node0rect.y+Lib_123Node0rect.height/2);
  69. Lib_123Node0.setSize(Lib_123Node0rect.width,Lib_123Node0rect.height);
  70. Lib_123Node0.setStyle("opacity",1);
  71. Lib_123Node0.s({'pixelPerfect':true});
  72. Lib_123Node0borderwidth=1;
  73. Lib_123Node0.setRotation(0);
  74. dataModel.add(Lib_123Node0);
  75. Lib_123Node0.a('node.points',Lib_123Node0compspts);
  76. Lib_123Node0.a('node.segments',[1,2]);
  77. Lib_123Node0.a('node.color','rgba(255,0,255,1)');
  78. Lib_123Node0.a('node.borderPattern',getDashStyle("@borderPattern@"));
  79. Lib_123Node0.a('node.borderColor','rgba(255,0,255,1)');
  80. Lib_123Node0.a('node.background','rgba(255,0,255,1)');
  81. Lib_123Node0.a('node.gradient','');
  82. Lib_123Node0.a('node.gradientcolor','rgba(255,0,255,1)');
  83. Lib_123Node0.a('node.endCompspts',Lib_123Node0endCompspts);
  84. Lib_123Node0.a('node.startCompspts',Lib_123Node0startCompspts);
  85. (function (node, img, compspts, endCompspts, startCompspts) {
  86. var position = node.getPosition(),
  87. w = node.getWidth()*_ratio.ratioX,
  88. h = node.getHeight()*_ratio.ratioY;
  89. function resetPoints(rx, ry) {
  90. for (var i = 0, len = compspts.length; i < len; i++) {
  91. if (i%2 === 0) {
  92. compspts[i]*=rx;
  93. } else {
  94. compspts[i]*=ry;
  95. }
  96. }
  97. endCompspts[0] = compspts[compspts.length-2];
  98. endCompspts[1] = compspts[compspts.length-1];
  99. endCompspts[2] *= rx;
  100. endCompspts[3] *= ry;
  101. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  102. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  103. startCompspts[0] = compspts[0];
  104. startCompspts[1] = compspts[1];
  105. startCompspts[2] *= rx;
  106. startCompspts[3] *= ry;
  107. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  108. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  109. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  110. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  111. }
  112. node.setSize(w, h);
  113. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  114. node.a('node.width', w);
  115. node.a('node.height', h);
  116. resetPoints(_ratio.ratioX, _ratio.ratioY);
  117. node.borderWidth = 1;
  118. node.a('node.borderwidth',node.borderWidth);
  119. node._nodename = 'Lib_123Node0';
  120. node._nodeType = 'line';
  121. zoomNodeList.push({
  122. node: node,
  123. attr: 'node.borderwidth'
  124. });
  125. var setWidth = node.setWidth,
  126. setHeight = node.setHeight,
  127. timer, rx = 1, ry = 1;
  128. node.setWidth = function (width) {
  129. var _width = this.getWidth();
  130. rx = width / _width;
  131. node.a('node.width', width);
  132. setWidth.apply(this, arguments);
  133. resetPoints(rx, 1);
  134. }
  135. node.setHeight = function (height) {
  136. var _height = this.getHeight();
  137. ry = height / _height;
  138. node.a('node.height', height);
  139. setHeight.apply(this, arguments);
  140. resetPoints(1, ry);
  141. }
  142. })(Lib_123Node0, Lib_123Node0.getImage(), Lib_123Node0compspts, Lib_123Node0endCompspts, Lib_123Node0startCompspts);
  143. var Lib_123Node1points=[27, 57,77, 57],
  144. Lib_123Node1rect=ht.Default.unionPoint([{x:27,y:57},{x:77,y:57}]),
  145. Lib_123Node1compspts=[];
  146. _ratio = GD.getRatioWithRotation(0, ratio);
  147. var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
  148. _endratio = GD.getRatioWithRotation(0, ratio);
  149. for(var i=0;i<Lib_123Node1points.length;i++){
  150. if(i%2==0){
  151. Lib_123Node1compspts.push(Lib_123Node1points[i]-Lib_123Node1rect.x);
  152. }else{
  153. Lib_123Node1compspts.push(Lib_123Node1points[i]-Lib_123Node1rect.y);
  154. }
  155. }
  156. var Lib_123Node1ptslength=Lib_123Node1compspts.length;
  157. if (Lib_123Node1rect.height === 0) {
  158. Lib_123Node1compspts[0] -= 0;
  159. Lib_123Node1compspts[Lib_123Node1ptslength-2] += 0;
  160. } else if (Lib_123Node1rect.width === 0){
  161. Lib_123Node1compspts[1] -= 0;
  162. Lib_123Node1compspts[Lib_123Node1ptslength-1] += 0;
  163. } else {
  164. Lib_123Node1compspts[0] -= 0;
  165. Lib_123Node1compspts[1] -= 0;
  166. Lib_123Node1compspts[Lib_123Node1ptslength-2] += 0;
  167. Lib_123Node1compspts[Lib_123Node1ptslength-1] += 0;
  168. }
  169. Lib_123Node1 = new ht.Node();
  170. Lib_123Node1.borderWidth = 1;
  171. Lib_123Node1rect.width = Lib_123Node1rect.width === 0 ? 0.0001 : Lib_123Node1rect.width;
  172. Lib_123Node1rect.height = Lib_123Node1rect.height === 0 ? 0.0001 : Lib_123Node1rect.height;
  173. var Lib_123Node1endCompspts = [Lib_123Node1compspts[Lib_123Node1ptslength-2],Lib_123Node1compspts[Lib_123Node1ptslength-1],0,0];
  174. var Lib_123Node1startCompspts = [Lib_123Node1compspts[0],Lib_123Node1compspts[1],0,0];
  175. Lib_123Node1.setImage(GD.getPolyLineJSON());
  176. Lib_123Node1.setPosition(Lib_123Node1rect.x+Lib_123Node1rect.width/2,Lib_123Node1rect.y+Lib_123Node1rect.height/2);
  177. Lib_123Node1.setSize(Lib_123Node1rect.width,Lib_123Node1rect.height);
  178. Lib_123Node1.setStyle("opacity",1);
  179. Lib_123Node1.s({'pixelPerfect':true});
  180. Lib_123Node1borderwidth=1;
  181. Lib_123Node1.setRotation(0);
  182. dataModel.add(Lib_123Node1);
  183. Lib_123Node1.a('node.points',Lib_123Node1compspts);
  184. Lib_123Node1.a('node.segments',[1,2]);
  185. Lib_123Node1.a('node.color','rgba(255,0,255,1)');
  186. Lib_123Node1.a('node.borderPattern',getDashStyle("@borderPattern@"));
  187. Lib_123Node1.a('node.borderColor','rgba(255,0,255,1)');
  188. Lib_123Node1.a('node.background','rgba(255,0,255,1)');
  189. Lib_123Node1.a('node.gradient','');
  190. Lib_123Node1.a('node.gradientcolor','rgba(255,0,255,1)');
  191. Lib_123Node1.a('node.endCompspts',Lib_123Node1endCompspts);
  192. Lib_123Node1.a('node.startCompspts',Lib_123Node1startCompspts);
  193. (function (node, img, compspts, endCompspts, startCompspts) {
  194. var position = node.getPosition(),
  195. w = node.getWidth()*_ratio.ratioX,
  196. h = node.getHeight()*_ratio.ratioY;
  197. function resetPoints(rx, ry) {
  198. for (var i = 0, len = compspts.length; i < len; i++) {
  199. if (i%2 === 0) {
  200. compspts[i]*=rx;
  201. } else {
  202. compspts[i]*=ry;
  203. }
  204. }
  205. endCompspts[0] = compspts[compspts.length-2];
  206. endCompspts[1] = compspts[compspts.length-1];
  207. endCompspts[2] *= rx;
  208. endCompspts[3] *= ry;
  209. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  210. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  211. startCompspts[0] = compspts[0];
  212. startCompspts[1] = compspts[1];
  213. startCompspts[2] *= rx;
  214. startCompspts[3] *= ry;
  215. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  216. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  217. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  218. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  219. }
  220. node.setSize(w, h);
  221. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  222. node.a('node.width', w);
  223. node.a('node.height', h);
  224. resetPoints(_ratio.ratioX, _ratio.ratioY);
  225. node.borderWidth = 1;
  226. node.a('node.borderwidth',node.borderWidth);
  227. node._nodename = 'Lib_123Node1';
  228. node._nodeType = 'line';
  229. zoomNodeList.push({
  230. node: node,
  231. attr: 'node.borderwidth'
  232. });
  233. var setWidth = node.setWidth,
  234. setHeight = node.setHeight,
  235. timer, rx = 1, ry = 1;
  236. node.setWidth = function (width) {
  237. var _width = this.getWidth();
  238. rx = width / _width;
  239. node.a('node.width', width);
  240. setWidth.apply(this, arguments);
  241. resetPoints(rx, 1);
  242. }
  243. node.setHeight = function (height) {
  244. var _height = this.getHeight();
  245. ry = height / _height;
  246. node.a('node.height', height);
  247. setHeight.apply(this, arguments);
  248. resetPoints(1, ry);
  249. }
  250. })(Lib_123Node1, Lib_123Node1.getImage(), Lib_123Node1compspts, Lib_123Node1endCompspts, Lib_123Node1startCompspts);
  251. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  252. var Lib_123Node2type = 'rect';
  253. var Lib_123Node2 = new ht.Node(),
  254. Lib_123Node2BorderWidth = 2*2;
  255. if (Lib_123Node2type === 'arc') {
  256. Lib_123Node2BorderWidth *= 2;
  257. }
  258. Lib_123Node2.setImage(GD.getRectJSON(15.36963*_ratio.ratioX, 25.91444*_ratio.ratioY, Lib_123Node2type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  259. Lib_123Node2.setPosition(75*ratio.ratioX, 28*ratio.ratioY);
  260. Lib_123Node2.setSize(15.36963*_ratio.ratioX, 25.91444*_ratio.ratioY);
  261. Lib_123Node2.s({
  262. 'pixelPerfect':true
  263. /*@AddPara@*/
  264. });
  265. Lib_123Node2.a('node.width', 15.36963*_ratio.ratioX);
  266. Lib_123Node2.a('node.height', 25.91444*_ratio.ratioY);
  267. Lib_123Node2.a('node.type', Lib_123Node2type);
  268. Lib_123Node2.a('node.rect', [0, 0, 15.36963*_ratio.ratioX, 25.91444*_ratio.ratioY]);
  269. Lib_123Node2.a('node.background', 'rgba(255,255,255,0.003921569)');
  270. Lib_123Node2.a('node.gradientcolor', '');
  271. Lib_123Node2.a('node.gradient', '');
  272. Lib_123Node2.a('node.borderwidth', Lib_123Node2BorderWidth);
  273. Lib_123Node2.a('node.color', 'rgba(255,0,255,1)');
  274. Lib_123Node2.a('node.fillrect', [0,0,0,0]);
  275. Lib_123Node2.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  276. Lib_123Node2.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  277. Lib_123Node2.a('node.fillgradient', '');
  278. if (Lib_123Node2type !== 'rect') {
  279. Lib_123Node2.a('node.arcFrom', parseFloat('@arcFrom@'));
  280. Lib_123Node2.a('node.arcTo', parseFloat('@arcTo@'));
  281. Lib_123Node2.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  282. }
  283. if (Lib_123Node2type === 'arc') {
  284. Lib_123Node2.a('node.arcOval', true);
  285. }
  286. Lib_123Node2.setRotation(0*Math.PI/180);
  287. Lib_123Node2.borderWidth = Lib_123Node2BorderWidth;
  288. Lib_123Node2.borderFillwidth = Lib_123Node2BorderWidth;
  289. dataModel.add(Lib_123Node2);
  290. Lib_123Node2._nodename = 'Lib_123Node2'
  291. Lib_123Node2._nodeType = 'rect';
  292. zoomNodeList.push({
  293. node: Lib_123Node2,
  294. attr: 'node.borderwidth'
  295. });
  296. (function (node, _img) {
  297. var setWidth = node.setWidth,
  298. setHeight = node.setHeight;
  299. node.setWidth = function (width) {
  300. if (width === this.getWidth()) return ;
  301. var height = this.getHeight();
  302. this.a('node.width', width);
  303. this.a('node.rect', [0,0,width, height]);
  304. setWidth.apply(this, arguments);
  305. }
  306. node.setHeight = function (height) {
  307. if (height === this.getHeight()) return ;
  308. var width = this.getWidth();
  309. this.a('node.height', height);
  310. this.a('node.rect', [0,0,width, height]);
  311. setHeight.apply(this, arguments);
  312. }
  313. })(Lib_123Node2, Lib_123Node2.getImage());var Lib_123Node3points=[75, 41,75, 50],
  314. Lib_123Node3rect=ht.Default.unionPoint([{x:75,y:41},{x:75,y:50}]),
  315. Lib_123Node3compspts=[];
  316. _ratio = GD.getRatioWithRotation(0, ratio);
  317. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  318. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  319. for(var i=0;i<Lib_123Node3points.length;i++){
  320. if(i%2==0){
  321. Lib_123Node3compspts.push(Lib_123Node3points[i]-Lib_123Node3rect.x);
  322. }else{
  323. Lib_123Node3compspts.push(Lib_123Node3points[i]-Lib_123Node3rect.y);
  324. }
  325. }
  326. var Lib_123Node3ptslength=Lib_123Node3compspts.length;
  327. if (Lib_123Node3rect.height === 0) {
  328. Lib_123Node3compspts[0] -= 0;
  329. Lib_123Node3compspts[Lib_123Node3ptslength-2] += 0;
  330. } else if (Lib_123Node3rect.width === 0){
  331. Lib_123Node3compspts[1] -= 0;
  332. Lib_123Node3compspts[Lib_123Node3ptslength-1] += 0;
  333. } else {
  334. Lib_123Node3compspts[0] -= 0;
  335. Lib_123Node3compspts[1] -= 0;
  336. Lib_123Node3compspts[Lib_123Node3ptslength-2] += 0;
  337. Lib_123Node3compspts[Lib_123Node3ptslength-1] += 0;
  338. }
  339. Lib_123Node3 = new ht.Node();
  340. Lib_123Node3.borderWidth = 2;
  341. Lib_123Node3rect.width = Lib_123Node3rect.width === 0 ? 0.0001 : Lib_123Node3rect.width;
  342. Lib_123Node3rect.height = Lib_123Node3rect.height === 0 ? 0.0001 : Lib_123Node3rect.height;
  343. var Lib_123Node3endCompspts = [Lib_123Node3compspts[Lib_123Node3ptslength-2],Lib_123Node3compspts[Lib_123Node3ptslength-1],0,0];
  344. var Lib_123Node3startCompspts = [Lib_123Node3compspts[0],Lib_123Node3compspts[1],0,0];
  345. Lib_123Node3.setImage(GD.getPolyLineJSON());
  346. Lib_123Node3.setPosition(Lib_123Node3rect.x+Lib_123Node3rect.width/2,Lib_123Node3rect.y+Lib_123Node3rect.height/2);
  347. Lib_123Node3.setSize(Lib_123Node3rect.width,Lib_123Node3rect.height);
  348. Lib_123Node3.setStyle("opacity",1);
  349. Lib_123Node3.s({'pixelPerfect':true});
  350. Lib_123Node3borderwidth=2;
  351. Lib_123Node3.setRotation(0);
  352. dataModel.add(Lib_123Node3);
  353. Lib_123Node3.a('node.points',Lib_123Node3compspts);
  354. Lib_123Node3.a('node.segments',[1,2]);
  355. Lib_123Node3.a('node.color','rgba(255,0,255,1)');
  356. Lib_123Node3.a('node.borderPattern',getDashStyle("@borderPattern@"));
  357. Lib_123Node3.a('node.borderColor','rgba(255,0,255,1)');
  358. Lib_123Node3.a('node.background','rgba(255,0,255,1)');
  359. Lib_123Node3.a('node.gradient','');
  360. Lib_123Node3.a('node.gradientcolor','rgba(255,0,255,1)');
  361. Lib_123Node3.a('node.endCompspts',Lib_123Node3endCompspts);
  362. Lib_123Node3.a('node.startCompspts',Lib_123Node3startCompspts);
  363. (function (node, img, compspts, endCompspts, startCompspts) {
  364. var position = node.getPosition(),
  365. w = node.getWidth()*_ratio.ratioX,
  366. h = node.getHeight()*_ratio.ratioY;
  367. function resetPoints(rx, ry) {
  368. for (var i = 0, len = compspts.length; i < len; i++) {
  369. if (i%2 === 0) {
  370. compspts[i]*=rx;
  371. } else {
  372. compspts[i]*=ry;
  373. }
  374. }
  375. endCompspts[0] = compspts[compspts.length-2];
  376. endCompspts[1] = compspts[compspts.length-1];
  377. endCompspts[2] *= rx;
  378. endCompspts[3] *= ry;
  379. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  380. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  381. startCompspts[0] = compspts[0];
  382. startCompspts[1] = compspts[1];
  383. startCompspts[2] *= rx;
  384. startCompspts[3] *= ry;
  385. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  386. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  387. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  388. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  389. }
  390. node.setSize(w, h);
  391. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  392. node.a('node.width', w);
  393. node.a('node.height', h);
  394. resetPoints(_ratio.ratioX, _ratio.ratioY);
  395. node.borderWidth = 2;
  396. node.a('node.borderwidth',node.borderWidth);
  397. node._nodename = 'Lib_123Node3';
  398. node._nodeType = 'line';
  399. zoomNodeList.push({
  400. node: node,
  401. attr: 'node.borderwidth'
  402. });
  403. var setWidth = node.setWidth,
  404. setHeight = node.setHeight,
  405. timer, rx = 1, ry = 1;
  406. node.setWidth = function (width) {
  407. var _width = this.getWidth();
  408. rx = width / _width;
  409. node.a('node.width', width);
  410. setWidth.apply(this, arguments);
  411. resetPoints(rx, 1);
  412. }
  413. node.setHeight = function (height) {
  414. var _height = this.getHeight();
  415. ry = height / _height;
  416. node.a('node.height', height);
  417. setHeight.apply(this, arguments);
  418. resetPoints(1, ry);
  419. }
  420. })(Lib_123Node3, Lib_123Node3.getImage(), Lib_123Node3compspts, Lib_123Node3endCompspts, Lib_123Node3startCompspts);
  421. var Lib_123Node4points=[75, 0,75, 27],
  422. Lib_123Node4rect=ht.Default.unionPoint([{x:75,y:0},{x:75,y:27}]),
  423. Lib_123Node4compspts=[];
  424. _ratio = GD.getRatioWithRotation(0, ratio);
  425. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  426. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  427. for(var i=0;i<Lib_123Node4points.length;i++){
  428. if(i%2==0){
  429. Lib_123Node4compspts.push(Lib_123Node4points[i]-Lib_123Node4rect.x);
  430. }else{
  431. Lib_123Node4compspts.push(Lib_123Node4points[i]-Lib_123Node4rect.y);
  432. }
  433. }
  434. var Lib_123Node4ptslength=Lib_123Node4compspts.length;
  435. if (Lib_123Node4rect.height === 0) {
  436. Lib_123Node4compspts[0] -= 0;
  437. Lib_123Node4compspts[Lib_123Node4ptslength-2] += 0;
  438. } else if (Lib_123Node4rect.width === 0){
  439. Lib_123Node4compspts[1] -= 0;
  440. Lib_123Node4compspts[Lib_123Node4ptslength-1] += 0;
  441. } else {
  442. Lib_123Node4compspts[0] -= 0;
  443. Lib_123Node4compspts[1] -= 0;
  444. Lib_123Node4compspts[Lib_123Node4ptslength-2] += 0;
  445. Lib_123Node4compspts[Lib_123Node4ptslength-1] += 0;
  446. }
  447. Lib_123Node4 = new ht.Node();
  448. Lib_123Node4.borderWidth = 2;
  449. Lib_123Node4rect.width = Lib_123Node4rect.width === 0 ? 0.0001 : Lib_123Node4rect.width;
  450. Lib_123Node4rect.height = Lib_123Node4rect.height === 0 ? 0.0001 : Lib_123Node4rect.height;
  451. var Lib_123Node4endCompspts = [Lib_123Node4compspts[Lib_123Node4ptslength-2],Lib_123Node4compspts[Lib_123Node4ptslength-1],0,0];
  452. var Lib_123Node4startCompspts = [Lib_123Node4compspts[0],Lib_123Node4compspts[1],0,0];
  453. Lib_123Node4.setImage(GD.getPolyLineJSON());
  454. Lib_123Node4.setPosition(Lib_123Node4rect.x+Lib_123Node4rect.width/2,Lib_123Node4rect.y+Lib_123Node4rect.height/2);
  455. Lib_123Node4.setSize(Lib_123Node4rect.width,Lib_123Node4rect.height);
  456. Lib_123Node4.setStyle("opacity",1);
  457. Lib_123Node4.s({'pixelPerfect':true});
  458. Lib_123Node4borderwidth=2;
  459. Lib_123Node4.setRotation(0);
  460. dataModel.add(Lib_123Node4);
  461. Lib_123Node4.a('node.points',Lib_123Node4compspts);
  462. Lib_123Node4.a('node.segments',[1,2]);
  463. Lib_123Node4.a('node.color','rgba(255,0,255,1)');
  464. Lib_123Node4.a('node.borderPattern',getDashStyle("@borderPattern@"));
  465. Lib_123Node4.a('node.borderColor','rgba(255,0,255,1)');
  466. Lib_123Node4.a('node.background','rgba(255,0,255,1)');
  467. Lib_123Node4.a('node.gradient','');
  468. Lib_123Node4.a('node.gradientcolor','rgba(255,0,255,1)');
  469. Lib_123Node4.a('node.endCompspts',Lib_123Node4endCompspts);
  470. Lib_123Node4.a('node.startCompspts',Lib_123Node4startCompspts);
  471. (function (node, img, compspts, endCompspts, startCompspts) {
  472. var position = node.getPosition(),
  473. w = node.getWidth()*_ratio.ratioX,
  474. h = node.getHeight()*_ratio.ratioY;
  475. function resetPoints(rx, ry) {
  476. for (var i = 0, len = compspts.length; i < len; i++) {
  477. if (i%2 === 0) {
  478. compspts[i]*=rx;
  479. } else {
  480. compspts[i]*=ry;
  481. }
  482. }
  483. endCompspts[0] = compspts[compspts.length-2];
  484. endCompspts[1] = compspts[compspts.length-1];
  485. endCompspts[2] *= rx;
  486. endCompspts[3] *= ry;
  487. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  488. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  489. startCompspts[0] = compspts[0];
  490. startCompspts[1] = compspts[1];
  491. startCompspts[2] *= rx;
  492. startCompspts[3] *= ry;
  493. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  494. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  495. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  496. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  497. }
  498. node.setSize(w, h);
  499. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  500. node.a('node.width', w);
  501. node.a('node.height', h);
  502. resetPoints(_ratio.ratioX, _ratio.ratioY);
  503. node.borderWidth = 2;
  504. node.a('node.borderwidth',node.borderWidth);
  505. node._nodename = 'Lib_123Node4';
  506. node._nodeType = 'line';
  507. zoomNodeList.push({
  508. node: node,
  509. attr: 'node.borderwidth'
  510. });
  511. var setWidth = node.setWidth,
  512. setHeight = node.setHeight,
  513. timer, rx = 1, ry = 1;
  514. node.setWidth = function (width) {
  515. var _width = this.getWidth();
  516. rx = width / _width;
  517. node.a('node.width', width);
  518. setWidth.apply(this, arguments);
  519. resetPoints(rx, 1);
  520. }
  521. node.setHeight = function (height) {
  522. var _height = this.getHeight();
  523. ry = height / _height;
  524. node.a('node.height', height);
  525. setHeight.apply(this, arguments);
  526. resetPoints(1, ry);
  527. }
  528. })(Lib_123Node4, Lib_123Node4.getImage(), Lib_123Node4compspts, Lib_123Node4endCompspts, Lib_123Node4startCompspts);
  529. var Lib_123Node5rect=ht.Default.unionPoint([{x: 70, y: 20},{x: 70, y: 20},{x: 79, y: 20},{x: 75, y: 28}]),
  530. Lib_123Node5points=[70,20,70,20,79,20,75,28],
  531. Lib_123Node5compsPoints=[],
  532. Lib_123Node5SetPoints = [{x: 70, y: 20},{x: 70, y: 20},{x: 79, y: 20},{x: 75, y: 28}],
  533. Lib_123Node5setSegments = [1,2,2,2];
  534. _ratio = GD.getRatioWithRotation(0, ratio);
  535. for(var i=0;i<Lib_123Node5points.length;i++){
  536. if(i%2==0){
  537. Lib_123Node5compsPoints.push(Lib_123Node5points[i]-Lib_123Node5rect.x);
  538. }else{
  539. Lib_123Node5compsPoints.push(Lib_123Node5points[i]-Lib_123Node5rect.y);
  540. }
  541. }
  542. var Lib_123Node5 = new ht.Node();
  543. Lib_123Node5.setImage(GD.getPolyGonJSON());
  544. Lib_123Node5.setPosition(Lib_123Node5rect.x + Lib_123Node5rect.width/2, Lib_123Node5rect.y + Lib_123Node5rect.height/2);
  545. Lib_123Node5.setSize(Lib_123Node5rect.width, Lib_123Node5rect.height);
  546. Lib_123Node5.setRotation(0);
  547. Lib_123Node5.borderWidth=2;
  548. Lib_123Node5.borderFillwidth=2*2;
  549. Lib_123Node5.s({'pixelPerfect':true});
  550. dataModel.add(Lib_123Node5);
  551. // Lib_123Node5.a('node.width', Lib_123Node5rect.width*_ratio.ratioX);
  552. // Lib_123Node5.a('node.height', Lib_123Node5rect.height*_ratio.ratioY);
  553. Lib_123Node5.a('node.clip', function(g,width,height,data) {
  554. var clippoints = Lib_123Node5SetPoints;
  555. if(clippoints.length<=3) return;
  556. if(Lib_123Node5.a('Lib_123Node5.isFill')=="false") return;
  557. var clipcompsPoints=[];
  558. var rect = ht.Default.unionPoint(clippoints);
  559. for(var i=0;i<clippoints.length;i++){
  560. clipcompsPoints.push({x:clippoints[i].x-rect.x,y:clippoints[i].y-rect.y});
  561. }
  562. var clipsegments=Lib_123Node5setSegments;
  563. g.beginPath();
  564. drawPoints(g,clipcompsPoints,clipsegments);
  565. g.clip();
  566. })
  567. Lib_123Node5.a('node.type', 'shape');
  568. Lib_123Node5.a('node.comsPoints', Lib_123Node5compsPoints);
  569. Lib_123Node5.a('node.closePath', true);
  570. Lib_123Node5.a('node.borderwidth', 2);
  571. Lib_123Node5.a('node.color', 'rgba(255,0,255,1)');
  572. Lib_123Node5.a('node.background','rgba(255,128,0,1)');
  573. Lib_123Node5.a('node.closePath', true);
  574. Lib_123Node5.a('node.closePath', true);
  575. Lib_123Node5.a('node.gradient','');
  576. Lib_123Node5.a('node.gradientcolor','rgba(255,128,0,1)');
  577. Lib_123Node5.a('node.isFill','false');
  578. Lib_123Node5.a('node.original',[0,0,0,0]);
  579. Lib_123Node5.a('node.fillrect',[0,0,0,0]);
  580. Lib_123Node5.a('node.fillbackcolor','rgba(255,128,0,1)');
  581. Lib_123Node5.a('node.fillgradient','');
  582. Lib_123Node5.a('node.fillgradientcolor','rgba(255,128,0,1)');
  583. Lib_123Node5.a('node.segments',Lib_123Node5setSegments);
  584. Lib_123Node5.a('node.borderPattern',"");
  585. (function (node, nodecompsPoints, setPoints) {
  586. var w = node.getWidth()*_ratio.ratioX,
  587. h = node.getHeight()*_ratio.ratioY,
  588. img = node.getImage();
  589. function resetPoints(rx, ry) {
  590. for (var i = 0, len = nodecompsPoints.length; i < len; i++) {
  591. if (i%2 === 0) {
  592. nodecompsPoints[i]*=rx;
  593. } else {
  594. nodecompsPoints[i]*=ry;
  595. }
  596. if (setPoints[i]) {
  597. setPoints[i].x *= rx;
  598. setPoints[i].y *= ry;
  599. }
  600. }
  601. }
  602. node.setSize(w, h);
  603. node.a('node.width', w);
  604. node.a('node.height', h);
  605. resetPoints(_ratio.ratioX, _ratio.ratioY);
  606. var position = node.getPosition();
  607. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  608. node._nodename = 'Lib_123Node5';
  609. node._nodeType = 'polygon';
  610. zoomNodeList.push({
  611. node: node,
  612. attr: 'node.borderwidth'
  613. });
  614. // 重载setWidth, setHeight
  615. var setWidth = node.setWidth,
  616. setHeight = node.setHeight,
  617. timer, rx = 1, ry = 1;
  618. node.setWidth = function (width) {
  619. var _width = this.getWidth();
  620. rx = width / _width;
  621. node.a('node.width', width);
  622. setWidth.apply(this, arguments);
  623. resetPoints(rx, 1);
  624. }
  625. node.setHeight = function (height) {
  626. var _height = this.getHeight();
  627. ry = height / _height;
  628. node.a('node.height', height);
  629. setHeight.apply(this, arguments);
  630. resetPoints(1, ry);
  631. }
  632. })(Lib_123Node5, Lib_123Node5compsPoints, Lib_123Node5SetPoints );
  633. var Lib_123Node6points=[71, 55,79, 55],
  634. Lib_123Node6rect=ht.Default.unionPoint([{x:71,y:55},{x:79,y:55}]),
  635. Lib_123Node6compspts=[];
  636. _ratio = GD.getRatioWithRotation(0, ratio);
  637. var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
  638. _endratio = GD.getRatioWithRotation(0, ratio);
  639. for(var i=0;i<Lib_123Node6points.length;i++){
  640. if(i%2==0){
  641. Lib_123Node6compspts.push(Lib_123Node6points[i]-Lib_123Node6rect.x);
  642. }else{
  643. Lib_123Node6compspts.push(Lib_123Node6points[i]-Lib_123Node6rect.y);
  644. }
  645. }
  646. var Lib_123Node6ptslength=Lib_123Node6compspts.length;
  647. if (Lib_123Node6rect.height === 0) {
  648. Lib_123Node6compspts[0] -= 0;
  649. Lib_123Node6compspts[Lib_123Node6ptslength-2] += 0;
  650. } else if (Lib_123Node6rect.width === 0){
  651. Lib_123Node6compspts[1] -= 0;
  652. Lib_123Node6compspts[Lib_123Node6ptslength-1] += 0;
  653. } else {
  654. Lib_123Node6compspts[0] -= 0;
  655. Lib_123Node6compspts[1] -= 0;
  656. Lib_123Node6compspts[Lib_123Node6ptslength-2] += 0;
  657. Lib_123Node6compspts[Lib_123Node6ptslength-1] += 0;
  658. }
  659. Lib_123Node6 = new ht.Node();
  660. Lib_123Node6.borderWidth = 2;
  661. Lib_123Node6rect.width = Lib_123Node6rect.width === 0 ? 0.0001 : Lib_123Node6rect.width;
  662. Lib_123Node6rect.height = Lib_123Node6rect.height === 0 ? 0.0001 : Lib_123Node6rect.height;
  663. var Lib_123Node6endCompspts = [Lib_123Node6compspts[Lib_123Node6ptslength-2],Lib_123Node6compspts[Lib_123Node6ptslength-1],0,0];
  664. var Lib_123Node6startCompspts = [Lib_123Node6compspts[0],Lib_123Node6compspts[1],0,0];
  665. Lib_123Node6.setImage(GD.getPolyLineJSON());
  666. Lib_123Node6.setPosition(Lib_123Node6rect.x+Lib_123Node6rect.width/2,Lib_123Node6rect.y+Lib_123Node6rect.height/2);
  667. Lib_123Node6.setSize(Lib_123Node6rect.width,Lib_123Node6rect.height);
  668. Lib_123Node6.setStyle("opacity",1);
  669. Lib_123Node6.s({'pixelPerfect':true});
  670. Lib_123Node6borderwidth=2;
  671. Lib_123Node6.setRotation(0);
  672. dataModel.add(Lib_123Node6);
  673. Lib_123Node6.a('node.points',Lib_123Node6compspts);
  674. Lib_123Node6.a('node.segments',[1,2]);
  675. Lib_123Node6.a('node.color','rgba(255,0,255,1)');
  676. Lib_123Node6.a('node.borderPattern',getDashStyle("@borderPattern@"));
  677. Lib_123Node6.a('node.borderColor','rgba(255,0,255,1)');
  678. Lib_123Node6.a('node.background','rgba(255,0,255,1)');
  679. Lib_123Node6.a('node.gradient','');
  680. Lib_123Node6.a('node.gradientcolor','rgba(255,0,255,1)');
  681. Lib_123Node6.a('node.endCompspts',Lib_123Node6endCompspts);
  682. Lib_123Node6.a('node.startCompspts',Lib_123Node6startCompspts);
  683. (function (node, img, compspts, endCompspts, startCompspts) {
  684. var position = node.getPosition(),
  685. w = node.getWidth()*_ratio.ratioX,
  686. h = node.getHeight()*_ratio.ratioY;
  687. function resetPoints(rx, ry) {
  688. for (var i = 0, len = compspts.length; i < len; i++) {
  689. if (i%2 === 0) {
  690. compspts[i]*=rx;
  691. } else {
  692. compspts[i]*=ry;
  693. }
  694. }
  695. endCompspts[0] = compspts[compspts.length-2];
  696. endCompspts[1] = compspts[compspts.length-1];
  697. endCompspts[2] *= rx;
  698. endCompspts[3] *= ry;
  699. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  700. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  701. startCompspts[0] = compspts[0];
  702. startCompspts[1] = compspts[1];
  703. startCompspts[2] *= rx;
  704. startCompspts[3] *= ry;
  705. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  706. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  707. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  708. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  709. }
  710. node.setSize(w, h);
  711. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  712. node.a('node.width', w);
  713. node.a('node.height', h);
  714. resetPoints(_ratio.ratioX, _ratio.ratioY);
  715. node.borderWidth = 2;
  716. node.a('node.borderwidth',node.borderWidth);
  717. node._nodename = 'Lib_123Node6';
  718. node._nodeType = 'line';
  719. zoomNodeList.push({
  720. node: node,
  721. attr: 'node.borderwidth'
  722. });
  723. var setWidth = node.setWidth,
  724. setHeight = node.setHeight,
  725. timer, rx = 1, ry = 1;
  726. node.setWidth = function (width) {
  727. var _width = this.getWidth();
  728. rx = width / _width;
  729. node.a('node.width', width);
  730. setWidth.apply(this, arguments);
  731. resetPoints(rx, 1);
  732. }
  733. node.setHeight = function (height) {
  734. var _height = this.getHeight();
  735. ry = height / _height;
  736. node.a('node.height', height);
  737. setHeight.apply(this, arguments);
  738. resetPoints(1, ry);
  739. }
  740. })(Lib_123Node6, Lib_123Node6.getImage(), Lib_123Node6compspts, Lib_123Node6endCompspts, Lib_123Node6startCompspts);
  741. var Lib_123Node7points=[67, 52,82, 52],
  742. Lib_123Node7rect=ht.Default.unionPoint([{x:67,y:52},{x:82,y:52}]),
  743. Lib_123Node7compspts=[];
  744. _ratio = GD.getRatioWithRotation(0, ratio);
  745. var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
  746. _endratio = GD.getRatioWithRotation(0, ratio);
  747. for(var i=0;i<Lib_123Node7points.length;i++){
  748. if(i%2==0){
  749. Lib_123Node7compspts.push(Lib_123Node7points[i]-Lib_123Node7rect.x);
  750. }else{
  751. Lib_123Node7compspts.push(Lib_123Node7points[i]-Lib_123Node7rect.y);
  752. }
  753. }
  754. var Lib_123Node7ptslength=Lib_123Node7compspts.length;
  755. if (Lib_123Node7rect.height === 0) {
  756. Lib_123Node7compspts[0] -= 0;
  757. Lib_123Node7compspts[Lib_123Node7ptslength-2] += 0;
  758. } else if (Lib_123Node7rect.width === 0){
  759. Lib_123Node7compspts[1] -= 0;
  760. Lib_123Node7compspts[Lib_123Node7ptslength-1] += 0;
  761. } else {
  762. Lib_123Node7compspts[0] -= 0;
  763. Lib_123Node7compspts[1] -= 0;
  764. Lib_123Node7compspts[Lib_123Node7ptslength-2] += 0;
  765. Lib_123Node7compspts[Lib_123Node7ptslength-1] += 0;
  766. }
  767. Lib_123Node7 = new ht.Node();
  768. Lib_123Node7.borderWidth = 2;
  769. Lib_123Node7rect.width = Lib_123Node7rect.width === 0 ? 0.0001 : Lib_123Node7rect.width;
  770. Lib_123Node7rect.height = Lib_123Node7rect.height === 0 ? 0.0001 : Lib_123Node7rect.height;
  771. var Lib_123Node7endCompspts = [Lib_123Node7compspts[Lib_123Node7ptslength-2],Lib_123Node7compspts[Lib_123Node7ptslength-1],0,0];
  772. var Lib_123Node7startCompspts = [Lib_123Node7compspts[0],Lib_123Node7compspts[1],0,0];
  773. Lib_123Node7.setImage(GD.getPolyLineJSON());
  774. Lib_123Node7.setPosition(Lib_123Node7rect.x+Lib_123Node7rect.width/2,Lib_123Node7rect.y+Lib_123Node7rect.height/2);
  775. Lib_123Node7.setSize(Lib_123Node7rect.width,Lib_123Node7rect.height);
  776. Lib_123Node7.setStyle("opacity",1);
  777. Lib_123Node7.s({'pixelPerfect':true});
  778. Lib_123Node7borderwidth=2;
  779. Lib_123Node7.setRotation(0);
  780. dataModel.add(Lib_123Node7);
  781. Lib_123Node7.a('node.points',Lib_123Node7compspts);
  782. Lib_123Node7.a('node.segments',[1,2]);
  783. Lib_123Node7.a('node.color','rgba(255,0,255,1)');
  784. Lib_123Node7.a('node.borderPattern',getDashStyle("@borderPattern@"));
  785. Lib_123Node7.a('node.borderColor','rgba(255,0,255,1)');
  786. Lib_123Node7.a('node.background','rgba(255,0,255,1)');
  787. Lib_123Node7.a('node.gradient','');
  788. Lib_123Node7.a('node.gradientcolor','rgba(255,0,255,1)');
  789. Lib_123Node7.a('node.endCompspts',Lib_123Node7endCompspts);
  790. Lib_123Node7.a('node.startCompspts',Lib_123Node7startCompspts);
  791. (function (node, img, compspts, endCompspts, startCompspts) {
  792. var position = node.getPosition(),
  793. w = node.getWidth()*_ratio.ratioX,
  794. h = node.getHeight()*_ratio.ratioY;
  795. function resetPoints(rx, ry) {
  796. for (var i = 0, len = compspts.length; i < len; i++) {
  797. if (i%2 === 0) {
  798. compspts[i]*=rx;
  799. } else {
  800. compspts[i]*=ry;
  801. }
  802. }
  803. endCompspts[0] = compspts[compspts.length-2];
  804. endCompspts[1] = compspts[compspts.length-1];
  805. endCompspts[2] *= rx;
  806. endCompspts[3] *= ry;
  807. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  808. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  809. startCompspts[0] = compspts[0];
  810. startCompspts[1] = compspts[1];
  811. startCompspts[2] *= rx;
  812. startCompspts[3] *= ry;
  813. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  814. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  815. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  816. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  817. }
  818. node.setSize(w, h);
  819. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  820. node.a('node.width', w);
  821. node.a('node.height', h);
  822. resetPoints(_ratio.ratioX, _ratio.ratioY);
  823. node.borderWidth = 2;
  824. node.a('node.borderwidth',node.borderWidth);
  825. node._nodename = 'Lib_123Node7';
  826. node._nodeType = 'line';
  827. zoomNodeList.push({
  828. node: node,
  829. attr: 'node.borderwidth'
  830. });
  831. var setWidth = node.setWidth,
  832. setHeight = node.setHeight,
  833. timer, rx = 1, ry = 1;
  834. node.setWidth = function (width) {
  835. var _width = this.getWidth();
  836. rx = width / _width;
  837. node.a('node.width', width);
  838. setWidth.apply(this, arguments);
  839. resetPoints(rx, 1);
  840. }
  841. node.setHeight = function (height) {
  842. var _height = this.getHeight();
  843. ry = height / _height;
  844. node.a('node.height', height);
  845. setHeight.apply(this, arguments);
  846. resetPoints(1, ry);
  847. }
  848. })(Lib_123Node7, Lib_123Node7.getImage(), Lib_123Node7compspts, Lib_123Node7endCompspts, Lib_123Node7startCompspts);
  849. var Lib_123Node8points=[66, 49,85, 49],
  850. Lib_123Node8rect=ht.Default.unionPoint([{x:66,y:49},{x:85,y:49}]),
  851. Lib_123Node8compspts=[];
  852. _ratio = GD.getRatioWithRotation(0, ratio);
  853. var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
  854. _endratio = GD.getRatioWithRotation(0, ratio);
  855. for(var i=0;i<Lib_123Node8points.length;i++){
  856. if(i%2==0){
  857. Lib_123Node8compspts.push(Lib_123Node8points[i]-Lib_123Node8rect.x);
  858. }else{
  859. Lib_123Node8compspts.push(Lib_123Node8points[i]-Lib_123Node8rect.y);
  860. }
  861. }
  862. var Lib_123Node8ptslength=Lib_123Node8compspts.length;
  863. if (Lib_123Node8rect.height === 0) {
  864. Lib_123Node8compspts[0] -= 0;
  865. Lib_123Node8compspts[Lib_123Node8ptslength-2] += 0;
  866. } else if (Lib_123Node8rect.width === 0){
  867. Lib_123Node8compspts[1] -= 0;
  868. Lib_123Node8compspts[Lib_123Node8ptslength-1] += 0;
  869. } else {
  870. Lib_123Node8compspts[0] -= 0;
  871. Lib_123Node8compspts[1] -= 0;
  872. Lib_123Node8compspts[Lib_123Node8ptslength-2] += 0;
  873. Lib_123Node8compspts[Lib_123Node8ptslength-1] += 0;
  874. }
  875. Lib_123Node8 = new ht.Node();
  876. Lib_123Node8.borderWidth = 2;
  877. Lib_123Node8rect.width = Lib_123Node8rect.width === 0 ? 0.0001 : Lib_123Node8rect.width;
  878. Lib_123Node8rect.height = Lib_123Node8rect.height === 0 ? 0.0001 : Lib_123Node8rect.height;
  879. var Lib_123Node8endCompspts = [Lib_123Node8compspts[Lib_123Node8ptslength-2],Lib_123Node8compspts[Lib_123Node8ptslength-1],0,0];
  880. var Lib_123Node8startCompspts = [Lib_123Node8compspts[0],Lib_123Node8compspts[1],0,0];
  881. Lib_123Node8.setImage(GD.getPolyLineJSON());
  882. Lib_123Node8.setPosition(Lib_123Node8rect.x+Lib_123Node8rect.width/2,Lib_123Node8rect.y+Lib_123Node8rect.height/2);
  883. Lib_123Node8.setSize(Lib_123Node8rect.width,Lib_123Node8rect.height);
  884. Lib_123Node8.setStyle("opacity",1);
  885. Lib_123Node8.s({'pixelPerfect':true});
  886. Lib_123Node8borderwidth=2;
  887. Lib_123Node8.setRotation(0);
  888. dataModel.add(Lib_123Node8);
  889. Lib_123Node8.a('node.points',Lib_123Node8compspts);
  890. Lib_123Node8.a('node.segments',[1,2]);
  891. Lib_123Node8.a('node.color','rgba(255,0,255,1)');
  892. Lib_123Node8.a('node.borderPattern',getDashStyle("@borderPattern@"));
  893. Lib_123Node8.a('node.borderColor','rgba(255,0,255,1)');
  894. Lib_123Node8.a('node.background','rgba(255,0,255,1)');
  895. Lib_123Node8.a('node.gradient','');
  896. Lib_123Node8.a('node.gradientcolor','rgba(255,0,255,1)');
  897. Lib_123Node8.a('node.endCompspts',Lib_123Node8endCompspts);
  898. Lib_123Node8.a('node.startCompspts',Lib_123Node8startCompspts);
  899. (function (node, img, compspts, endCompspts, startCompspts) {
  900. var position = node.getPosition(),
  901. w = node.getWidth()*_ratio.ratioX,
  902. h = node.getHeight()*_ratio.ratioY;
  903. function resetPoints(rx, ry) {
  904. for (var i = 0, len = compspts.length; i < len; i++) {
  905. if (i%2 === 0) {
  906. compspts[i]*=rx;
  907. } else {
  908. compspts[i]*=ry;
  909. }
  910. }
  911. endCompspts[0] = compspts[compspts.length-2];
  912. endCompspts[1] = compspts[compspts.length-1];
  913. endCompspts[2] *= rx;
  914. endCompspts[3] *= ry;
  915. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  916. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  917. startCompspts[0] = compspts[0];
  918. startCompspts[1] = compspts[1];
  919. startCompspts[2] *= rx;
  920. startCompspts[3] *= ry;
  921. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  922. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  923. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  924. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  925. }
  926. node.setSize(w, h);
  927. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  928. node.a('node.width', w);
  929. node.a('node.height', h);
  930. resetPoints(_ratio.ratioX, _ratio.ratioY);
  931. node.borderWidth = 2;
  932. node.a('node.borderwidth',node.borderWidth);
  933. node._nodename = 'Lib_123Node8';
  934. node._nodeType = 'line';
  935. zoomNodeList.push({
  936. node: node,
  937. attr: 'node.borderwidth'
  938. });
  939. var setWidth = node.setWidth,
  940. setHeight = node.setHeight,
  941. timer, rx = 1, ry = 1;
  942. node.setWidth = function (width) {
  943. var _width = this.getWidth();
  944. rx = width / _width;
  945. node.a('node.width', width);
  946. setWidth.apply(this, arguments);
  947. resetPoints(rx, 1);
  948. }
  949. node.setHeight = function (height) {
  950. var _height = this.getHeight();
  951. ry = height / _height;
  952. node.a('node.height', height);
  953. setHeight.apply(this, arguments);
  954. resetPoints(1, ry);
  955. }
  956. })(Lib_123Node8, Lib_123Node8.getImage(), Lib_123Node8compspts, Lib_123Node8endCompspts, Lib_123Node8startCompspts);
  957. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  958. var Lib_123Node9type = 'oval';
  959. var Lib_123Node9 = new ht.Node(),
  960. Lib_123Node9BorderWidth = 2*2;
  961. if (Lib_123Node9type === 'arc') {
  962. Lib_123Node9BorderWidth *= 2;
  963. }
  964. Lib_123Node9.setImage(GD.getRectJSON(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY, Lib_123Node9type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  965. Lib_123Node9.setPosition(30*ratio.ratioX, 19*ratio.ratioY);
  966. Lib_123Node9.setSize(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY);
  967. Lib_123Node9.s({
  968. 'pixelPerfect':true
  969. /*@AddPara@*/
  970. });
  971. Lib_123Node9.a('node.width', 24.12698*_ratio.ratioX);
  972. Lib_123Node9.a('node.height', 20.63269*_ratio.ratioY);
  973. Lib_123Node9.a('node.type', Lib_123Node9type);
  974. Lib_123Node9.a('node.rect', [0, 0, 24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY]);
  975. Lib_123Node9.a('node.background', 'rgba(255,255,255,0.003921569)');
  976. Lib_123Node9.a('node.gradientcolor', '');
  977. Lib_123Node9.a('node.gradient', '');
  978. Lib_123Node9.a('node.borderwidth', Lib_123Node9BorderWidth);
  979. Lib_123Node9.a('node.color', 'rgba(255,0,255,1)');
  980. Lib_123Node9.a('node.fillrect', [0,0,0,0]);
  981. Lib_123Node9.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  982. Lib_123Node9.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  983. Lib_123Node9.a('node.fillgradient', '');
  984. if (Lib_123Node9type !== 'rect') {
  985. Lib_123Node9.a('node.arcFrom', parseFloat('@arcFrom@'));
  986. Lib_123Node9.a('node.arcTo', parseFloat('@arcTo@'));
  987. Lib_123Node9.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  988. }
  989. if (Lib_123Node9type === 'arc') {
  990. Lib_123Node9.a('node.arcOval', true);
  991. }
  992. Lib_123Node9.setRotation(0*Math.PI/180);
  993. Lib_123Node9.borderWidth = Lib_123Node9BorderWidth;
  994. Lib_123Node9.borderFillwidth = Lib_123Node9BorderWidth;
  995. dataModel.add(Lib_123Node9);
  996. Lib_123Node9._nodename = 'Lib_123Node9'
  997. Lib_123Node9._nodeType = 'rect';
  998. zoomNodeList.push({
  999. node: Lib_123Node9,
  1000. attr: 'node.borderwidth'
  1001. });
  1002. (function (node, _img) {
  1003. var setWidth = node.setWidth,
  1004. setHeight = node.setHeight;
  1005. node.setWidth = function (width) {
  1006. if (width === this.getWidth()) return ;
  1007. var height = this.getHeight();
  1008. this.a('node.width', width);
  1009. this.a('node.rect', [0,0,width, height]);
  1010. setWidth.apply(this, arguments);
  1011. }
  1012. node.setHeight = function (height) {
  1013. if (height === this.getHeight()) return ;
  1014. var width = this.getWidth();
  1015. this.a('node.height', height);
  1016. this.a('node.rect', [0,0,width, height]);
  1017. setHeight.apply(this, arguments);
  1018. }
  1019. })(Lib_123Node9, Lib_123Node9.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  1020. var Lib_123Node10type = 'oval';
  1021. var Lib_123Node10 = new ht.Node(),
  1022. Lib_123Node10BorderWidth = 2*2;
  1023. if (Lib_123Node10type === 'arc') {
  1024. Lib_123Node10BorderWidth *= 2;
  1025. }
  1026. Lib_123Node10.setImage(GD.getRectJSON(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY, Lib_123Node10type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  1027. Lib_123Node10.setPosition(12*ratio.ratioX, 27*ratio.ratioY);
  1028. Lib_123Node10.setSize(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY);
  1029. Lib_123Node10.s({
  1030. 'pixelPerfect':true
  1031. /*@AddPara@*/
  1032. });
  1033. Lib_123Node10.a('node.width', 24.12698*_ratio.ratioX);
  1034. Lib_123Node10.a('node.height', 20.63269*_ratio.ratioY);
  1035. Lib_123Node10.a('node.type', Lib_123Node10type);
  1036. Lib_123Node10.a('node.rect', [0, 0, 24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY]);
  1037. Lib_123Node10.a('node.background', 'rgba(255,255,255,0.003921569)');
  1038. Lib_123Node10.a('node.gradientcolor', '');
  1039. Lib_123Node10.a('node.gradient', '');
  1040. Lib_123Node10.a('node.borderwidth', Lib_123Node10BorderWidth);
  1041. Lib_123Node10.a('node.color', 'rgba(255,0,255,1)');
  1042. Lib_123Node10.a('node.fillrect', [0,0,0,0]);
  1043. Lib_123Node10.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  1044. Lib_123Node10.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  1045. Lib_123Node10.a('node.fillgradient', '');
  1046. if (Lib_123Node10type !== 'rect') {
  1047. Lib_123Node10.a('node.arcFrom', parseFloat('@arcFrom@'));
  1048. Lib_123Node10.a('node.arcTo', parseFloat('@arcTo@'));
  1049. Lib_123Node10.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  1050. }
  1051. if (Lib_123Node10type === 'arc') {
  1052. Lib_123Node10.a('node.arcOval', true);
  1053. }
  1054. Lib_123Node10.setRotation(0*Math.PI/180);
  1055. Lib_123Node10.borderWidth = Lib_123Node10BorderWidth;
  1056. Lib_123Node10.borderFillwidth = Lib_123Node10BorderWidth;
  1057. dataModel.add(Lib_123Node10);
  1058. Lib_123Node10._nodename = 'Lib_123Node10'
  1059. Lib_123Node10._nodeType = 'rect';
  1060. zoomNodeList.push({
  1061. node: Lib_123Node10,
  1062. attr: 'node.borderwidth'
  1063. });
  1064. (function (node, _img) {
  1065. var setWidth = node.setWidth,
  1066. setHeight = node.setHeight;
  1067. node.setWidth = function (width) {
  1068. if (width === this.getWidth()) return ;
  1069. var height = this.getHeight();
  1070. this.a('node.width', width);
  1071. this.a('node.rect', [0,0,width, height]);
  1072. setWidth.apply(this, arguments);
  1073. }
  1074. node.setHeight = function (height) {
  1075. if (height === this.getHeight()) return ;
  1076. var width = this.getWidth();
  1077. this.a('node.height', height);
  1078. this.a('node.rect', [0,0,width, height]);
  1079. setHeight.apply(this, arguments);
  1080. }
  1081. })(Lib_123Node10, Lib_123Node10.getImage());var Lib_123Node11rect=ht.Default.unionPoint([{x: 5, y: 22},{x: 5, y: 22},{x: 14, y: 22},{x: 10, y: 32}]),
  1082. Lib_123Node11points=[5,22,5,22,14,22,10,32],
  1083. Lib_123Node11compsPoints=[],
  1084. Lib_123Node11SetPoints = [{x: 5, y: 22},{x: 5, y: 22},{x: 14, y: 22},{x: 10, y: 32}],
  1085. Lib_123Node11setSegments = [1,2,2,2];
  1086. _ratio = GD.getRatioWithRotation(1.570796, ratio);
  1087. for(var i=0;i<Lib_123Node11points.length;i++){
  1088. if(i%2==0){
  1089. Lib_123Node11compsPoints.push(Lib_123Node11points[i]-Lib_123Node11rect.x);
  1090. }else{
  1091. Lib_123Node11compsPoints.push(Lib_123Node11points[i]-Lib_123Node11rect.y);
  1092. }
  1093. }
  1094. var Lib_123Node11 = new ht.Node();
  1095. Lib_123Node11.setImage(GD.getPolyGonJSON());
  1096. Lib_123Node11.setPosition(Lib_123Node11rect.x + Lib_123Node11rect.width/2, Lib_123Node11rect.y + Lib_123Node11rect.height/2);
  1097. Lib_123Node11.setSize(Lib_123Node11rect.width, Lib_123Node11rect.height);
  1098. Lib_123Node11.setRotation(1.570796);
  1099. Lib_123Node11.borderWidth=2;
  1100. Lib_123Node11.borderFillwidth=2*2;
  1101. Lib_123Node11.s({'pixelPerfect':true});
  1102. dataModel.add(Lib_123Node11);
  1103. // Lib_123Node11.a('node.width', Lib_123Node11rect.width*_ratio.ratioX);
  1104. // Lib_123Node11.a('node.height', Lib_123Node11rect.height*_ratio.ratioY);
  1105. Lib_123Node11.a('node.clip', function(g,width,height,data) {
  1106. var clippoints = Lib_123Node11SetPoints;
  1107. if(clippoints.length<=3) return;
  1108. if(Lib_123Node11.a('Lib_123Node11.isFill')=="false") return;
  1109. var clipcompsPoints=[];
  1110. var rect = ht.Default.unionPoint(clippoints);
  1111. for(var i=0;i<clippoints.length;i++){
  1112. clipcompsPoints.push({x:clippoints[i].x-rect.x,y:clippoints[i].y-rect.y});
  1113. }
  1114. var clipsegments=Lib_123Node11setSegments;
  1115. g.beginPath();
  1116. drawPoints(g,clipcompsPoints,clipsegments);
  1117. g.clip();
  1118. })
  1119. Lib_123Node11.a('node.type', 'shape');
  1120. Lib_123Node11.a('node.comsPoints', Lib_123Node11compsPoints);
  1121. Lib_123Node11.a('node.closePath', true);
  1122. Lib_123Node11.a('node.borderwidth', 2);
  1123. Lib_123Node11.a('node.color', 'rgba(255,0,255,1)');
  1124. Lib_123Node11.a('node.background','rgba(255,255,255,0.003921569)');
  1125. Lib_123Node11.a('node.closePath', true);
  1126. Lib_123Node11.a('node.closePath', true);
  1127. Lib_123Node11.a('node.gradient','');
  1128. Lib_123Node11.a('node.gradientcolor','');
  1129. Lib_123Node11.a('node.isFill','false');
  1130. Lib_123Node11.a('node.original',[0,0,0,0]);
  1131. Lib_123Node11.a('node.fillrect',[0,0,0,0]);
  1132. Lib_123Node11.a('node.fillbackcolor','rgba(255,255,255,0.003921569)');
  1133. Lib_123Node11.a('node.fillgradient','');
  1134. Lib_123Node11.a('node.fillgradientcolor','');
  1135. Lib_123Node11.a('node.segments',Lib_123Node11setSegments);
  1136. Lib_123Node11.a('node.borderPattern',"");
  1137. (function (node, nodecompsPoints, setPoints) {
  1138. var w = node.getWidth()*_ratio.ratioX,
  1139. h = node.getHeight()*_ratio.ratioY,
  1140. img = node.getImage();
  1141. function resetPoints(rx, ry) {
  1142. for (var i = 0, len = nodecompsPoints.length; i < len; i++) {
  1143. if (i%2 === 0) {
  1144. nodecompsPoints[i]*=rx;
  1145. } else {
  1146. nodecompsPoints[i]*=ry;
  1147. }
  1148. if (setPoints[i]) {
  1149. setPoints[i].x *= rx;
  1150. setPoints[i].y *= ry;
  1151. }
  1152. }
  1153. }
  1154. node.setSize(w, h);
  1155. node.a('node.width', w);
  1156. node.a('node.height', h);
  1157. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1158. var position = node.getPosition();
  1159. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1160. node._nodename = 'Lib_123Node11';
  1161. node._nodeType = 'polygon';
  1162. zoomNodeList.push({
  1163. node: node,
  1164. attr: 'node.borderwidth'
  1165. });
  1166. // 重载setWidth, setHeight
  1167. var setWidth = node.setWidth,
  1168. setHeight = node.setHeight,
  1169. timer, rx = 1, ry = 1;
  1170. node.setWidth = function (width) {
  1171. var _width = this.getWidth();
  1172. rx = width / _width;
  1173. node.a('node.width', width);
  1174. setWidth.apply(this, arguments);
  1175. resetPoints(rx, 1);
  1176. }
  1177. node.setHeight = function (height) {
  1178. var _height = this.getHeight();
  1179. ry = height / _height;
  1180. node.a('node.height', height);
  1181. setHeight.apply(this, arguments);
  1182. resetPoints(1, ry);
  1183. }
  1184. })(Lib_123Node11, Lib_123Node11compsPoints, Lib_123Node11SetPoints );
  1185. var Lib_123Node12points=[30, 13,30, 19],
  1186. Lib_123Node12rect=ht.Default.unionPoint([{x:30,y:13},{x:30,y:19}]),
  1187. Lib_123Node12compspts=[];
  1188. _ratio = GD.getRatioWithRotation(0, ratio);
  1189. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  1190. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  1191. for(var i=0;i<Lib_123Node12points.length;i++){
  1192. if(i%2==0){
  1193. Lib_123Node12compspts.push(Lib_123Node12points[i]-Lib_123Node12rect.x);
  1194. }else{
  1195. Lib_123Node12compspts.push(Lib_123Node12points[i]-Lib_123Node12rect.y);
  1196. }
  1197. }
  1198. var Lib_123Node12ptslength=Lib_123Node12compspts.length;
  1199. if (Lib_123Node12rect.height === 0) {
  1200. Lib_123Node12compspts[0] -= 0;
  1201. Lib_123Node12compspts[Lib_123Node12ptslength-2] += 0;
  1202. } else if (Lib_123Node12rect.width === 0){
  1203. Lib_123Node12compspts[1] -= 0;
  1204. Lib_123Node12compspts[Lib_123Node12ptslength-1] += 0;
  1205. } else {
  1206. Lib_123Node12compspts[0] -= 0;
  1207. Lib_123Node12compspts[1] -= 0;
  1208. Lib_123Node12compspts[Lib_123Node12ptslength-2] += 0;
  1209. Lib_123Node12compspts[Lib_123Node12ptslength-1] += 0;
  1210. }
  1211. Lib_123Node12 = new ht.Node();
  1212. Lib_123Node12.borderWidth = 2;
  1213. Lib_123Node12rect.width = Lib_123Node12rect.width === 0 ? 0.0001 : Lib_123Node12rect.width;
  1214. Lib_123Node12rect.height = Lib_123Node12rect.height === 0 ? 0.0001 : Lib_123Node12rect.height;
  1215. var Lib_123Node12endCompspts = [Lib_123Node12compspts[Lib_123Node12ptslength-2],Lib_123Node12compspts[Lib_123Node12ptslength-1],0,0];
  1216. var Lib_123Node12startCompspts = [Lib_123Node12compspts[0],Lib_123Node12compspts[1],0,0];
  1217. Lib_123Node12.setImage(GD.getPolyLineJSON());
  1218. Lib_123Node12.setPosition(Lib_123Node12rect.x+Lib_123Node12rect.width/2,Lib_123Node12rect.y+Lib_123Node12rect.height/2);
  1219. Lib_123Node12.setSize(Lib_123Node12rect.width,Lib_123Node12rect.height);
  1220. Lib_123Node12.setStyle("opacity",1);
  1221. Lib_123Node12.s({'pixelPerfect':true});
  1222. Lib_123Node12borderwidth=2;
  1223. Lib_123Node12.setRotation(0);
  1224. dataModel.add(Lib_123Node12);
  1225. Lib_123Node12.a('node.points',Lib_123Node12compspts);
  1226. Lib_123Node12.a('node.segments',[1,2]);
  1227. Lib_123Node12.a('node.color','rgba(255,0,255,1)');
  1228. Lib_123Node12.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1229. Lib_123Node12.a('node.borderColor','rgba(255,0,255,1)');
  1230. Lib_123Node12.a('node.background','rgba(255,0,255,1)');
  1231. Lib_123Node12.a('node.gradient','');
  1232. Lib_123Node12.a('node.gradientcolor','rgba(255,0,255,1)');
  1233. Lib_123Node12.a('node.endCompspts',Lib_123Node12endCompspts);
  1234. Lib_123Node12.a('node.startCompspts',Lib_123Node12startCompspts);
  1235. (function (node, img, compspts, endCompspts, startCompspts) {
  1236. var position = node.getPosition(),
  1237. w = node.getWidth()*_ratio.ratioX,
  1238. h = node.getHeight()*_ratio.ratioY;
  1239. function resetPoints(rx, ry) {
  1240. for (var i = 0, len = compspts.length; i < len; i++) {
  1241. if (i%2 === 0) {
  1242. compspts[i]*=rx;
  1243. } else {
  1244. compspts[i]*=ry;
  1245. }
  1246. }
  1247. endCompspts[0] = compspts[compspts.length-2];
  1248. endCompspts[1] = compspts[compspts.length-1];
  1249. endCompspts[2] *= rx;
  1250. endCompspts[3] *= ry;
  1251. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1252. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1253. startCompspts[0] = compspts[0];
  1254. startCompspts[1] = compspts[1];
  1255. startCompspts[2] *= rx;
  1256. startCompspts[3] *= ry;
  1257. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1258. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1259. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1260. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1261. }
  1262. node.setSize(w, h);
  1263. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1264. node.a('node.width', w);
  1265. node.a('node.height', h);
  1266. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1267. node.borderWidth = 2;
  1268. node.a('node.borderwidth',node.borderWidth);
  1269. node._nodename = 'Lib_123Node12';
  1270. node._nodeType = 'line';
  1271. zoomNodeList.push({
  1272. node: node,
  1273. attr: 'node.borderwidth'
  1274. });
  1275. var setWidth = node.setWidth,
  1276. setHeight = node.setHeight,
  1277. timer, rx = 1, ry = 1;
  1278. node.setWidth = function (width) {
  1279. var _width = this.getWidth();
  1280. rx = width / _width;
  1281. node.a('node.width', width);
  1282. setWidth.apply(this, arguments);
  1283. resetPoints(rx, 1);
  1284. }
  1285. node.setHeight = function (height) {
  1286. var _height = this.getHeight();
  1287. ry = height / _height;
  1288. node.a('node.height', height);
  1289. setHeight.apply(this, arguments);
  1290. resetPoints(1, ry);
  1291. }
  1292. })(Lib_123Node12, Lib_123Node12.getImage(), Lib_123Node12compspts, Lib_123Node12endCompspts, Lib_123Node12startCompspts);
  1293. var Lib_123Node13points=[30, 19,36, 23],
  1294. Lib_123Node13rect=ht.Default.unionPoint([{x:30,y:19},{x:36,y:23}]),
  1295. Lib_123Node13compspts=[];
  1296. _ratio = GD.getRatioWithRotation(0, ratio);
  1297. var _startratio = GD.getRatioWithRotation(3.72959527089228, ratio),
  1298. _endratio = GD.getRatioWithRotation(0.588002617302485, ratio);
  1299. for(var i=0;i<Lib_123Node13points.length;i++){
  1300. if(i%2==0){
  1301. Lib_123Node13compspts.push(Lib_123Node13points[i]-Lib_123Node13rect.x);
  1302. }else{
  1303. Lib_123Node13compspts.push(Lib_123Node13points[i]-Lib_123Node13rect.y);
  1304. }
  1305. }
  1306. var Lib_123Node13ptslength=Lib_123Node13compspts.length;
  1307. if (Lib_123Node13rect.height === 0) {
  1308. Lib_123Node13compspts[0] -= 0;
  1309. Lib_123Node13compspts[Lib_123Node13ptslength-2] += 0;
  1310. } else if (Lib_123Node13rect.width === 0){
  1311. Lib_123Node13compspts[1] -= 0;
  1312. Lib_123Node13compspts[Lib_123Node13ptslength-1] += 0;
  1313. } else {
  1314. Lib_123Node13compspts[0] -= 0;
  1315. Lib_123Node13compspts[1] -= 0;
  1316. Lib_123Node13compspts[Lib_123Node13ptslength-2] += 0;
  1317. Lib_123Node13compspts[Lib_123Node13ptslength-1] += 0;
  1318. }
  1319. Lib_123Node13 = new ht.Node();
  1320. Lib_123Node13.borderWidth = 2;
  1321. Lib_123Node13rect.width = Lib_123Node13rect.width === 0 ? 0.0001 : Lib_123Node13rect.width;
  1322. Lib_123Node13rect.height = Lib_123Node13rect.height === 0 ? 0.0001 : Lib_123Node13rect.height;
  1323. var Lib_123Node13endCompspts = [Lib_123Node13compspts[Lib_123Node13ptslength-2],Lib_123Node13compspts[Lib_123Node13ptslength-1],0,0];
  1324. var Lib_123Node13startCompspts = [Lib_123Node13compspts[0],Lib_123Node13compspts[1],0,0];
  1325. Lib_123Node13.setImage(GD.getPolyLineJSON());
  1326. Lib_123Node13.setPosition(Lib_123Node13rect.x+Lib_123Node13rect.width/2,Lib_123Node13rect.y+Lib_123Node13rect.height/2);
  1327. Lib_123Node13.setSize(Lib_123Node13rect.width,Lib_123Node13rect.height);
  1328. Lib_123Node13.setStyle("opacity",1);
  1329. Lib_123Node13.s({'pixelPerfect':true});
  1330. Lib_123Node13borderwidth=2;
  1331. Lib_123Node13.setRotation(0);
  1332. dataModel.add(Lib_123Node13);
  1333. Lib_123Node13.a('node.points',Lib_123Node13compspts);
  1334. Lib_123Node13.a('node.segments',[1,2]);
  1335. Lib_123Node13.a('node.color','rgba(255,0,255,1)');
  1336. Lib_123Node13.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1337. Lib_123Node13.a('node.borderColor','rgba(255,0,255,1)');
  1338. Lib_123Node13.a('node.background','rgba(255,0,255,1)');
  1339. Lib_123Node13.a('node.gradient','');
  1340. Lib_123Node13.a('node.gradientcolor','rgba(255,0,255,1)');
  1341. Lib_123Node13.a('node.endCompspts',Lib_123Node13endCompspts);
  1342. Lib_123Node13.a('node.startCompspts',Lib_123Node13startCompspts);
  1343. (function (node, img, compspts, endCompspts, startCompspts) {
  1344. var position = node.getPosition(),
  1345. w = node.getWidth()*_ratio.ratioX,
  1346. h = node.getHeight()*_ratio.ratioY;
  1347. function resetPoints(rx, ry) {
  1348. for (var i = 0, len = compspts.length; i < len; i++) {
  1349. if (i%2 === 0) {
  1350. compspts[i]*=rx;
  1351. } else {
  1352. compspts[i]*=ry;
  1353. }
  1354. }
  1355. endCompspts[0] = compspts[compspts.length-2];
  1356. endCompspts[1] = compspts[compspts.length-1];
  1357. endCompspts[2] *= rx;
  1358. endCompspts[3] *= ry;
  1359. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1360. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1361. startCompspts[0] = compspts[0];
  1362. startCompspts[1] = compspts[1];
  1363. startCompspts[2] *= rx;
  1364. startCompspts[3] *= ry;
  1365. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1366. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1367. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1368. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1369. }
  1370. node.setSize(w, h);
  1371. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1372. node.a('node.width', w);
  1373. node.a('node.height', h);
  1374. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1375. node.borderWidth = 2;
  1376. node.a('node.borderwidth',node.borderWidth);
  1377. node._nodename = 'Lib_123Node13';
  1378. node._nodeType = 'line';
  1379. zoomNodeList.push({
  1380. node: node,
  1381. attr: 'node.borderwidth'
  1382. });
  1383. var setWidth = node.setWidth,
  1384. setHeight = node.setHeight,
  1385. timer, rx = 1, ry = 1;
  1386. node.setWidth = function (width) {
  1387. var _width = this.getWidth();
  1388. rx = width / _width;
  1389. node.a('node.width', width);
  1390. setWidth.apply(this, arguments);
  1391. resetPoints(rx, 1);
  1392. }
  1393. node.setHeight = function (height) {
  1394. var _height = this.getHeight();
  1395. ry = height / _height;
  1396. node.a('node.height', height);
  1397. setHeight.apply(this, arguments);
  1398. resetPoints(1, ry);
  1399. }
  1400. })(Lib_123Node13, Lib_123Node13.getImage(), Lib_123Node13compspts, Lib_123Node13endCompspts, Lib_123Node13startCompspts);
  1401. var Lib_123Node14points=[30, 19,24, 23],
  1402. Lib_123Node14rect=ht.Default.unionPoint([{x:30,y:19},{x:24,y:23}]),
  1403. Lib_123Node14compspts=[];
  1404. _ratio = GD.getRatioWithRotation(0, ratio);
  1405. var _startratio = GD.getRatioWithRotation(-0.588002617302485, ratio),
  1406. _endratio = GD.getRatioWithRotation(2.55359003628731, ratio);
  1407. for(var i=0;i<Lib_123Node14points.length;i++){
  1408. if(i%2==0){
  1409. Lib_123Node14compspts.push(Lib_123Node14points[i]-Lib_123Node14rect.x);
  1410. }else{
  1411. Lib_123Node14compspts.push(Lib_123Node14points[i]-Lib_123Node14rect.y);
  1412. }
  1413. }
  1414. var Lib_123Node14ptslength=Lib_123Node14compspts.length;
  1415. if (Lib_123Node14rect.height === 0) {
  1416. Lib_123Node14compspts[0] -= 0;
  1417. Lib_123Node14compspts[Lib_123Node14ptslength-2] += 0;
  1418. } else if (Lib_123Node14rect.width === 0){
  1419. Lib_123Node14compspts[1] -= 0;
  1420. Lib_123Node14compspts[Lib_123Node14ptslength-1] += 0;
  1421. } else {
  1422. Lib_123Node14compspts[0] -= 0;
  1423. Lib_123Node14compspts[1] -= 0;
  1424. Lib_123Node14compspts[Lib_123Node14ptslength-2] += 0;
  1425. Lib_123Node14compspts[Lib_123Node14ptslength-1] += 0;
  1426. }
  1427. Lib_123Node14 = new ht.Node();
  1428. Lib_123Node14.borderWidth = 2;
  1429. Lib_123Node14rect.width = Lib_123Node14rect.width === 0 ? 0.0001 : Lib_123Node14rect.width;
  1430. Lib_123Node14rect.height = Lib_123Node14rect.height === 0 ? 0.0001 : Lib_123Node14rect.height;
  1431. var Lib_123Node14endCompspts = [Lib_123Node14compspts[Lib_123Node14ptslength-2],Lib_123Node14compspts[Lib_123Node14ptslength-1],0,0];
  1432. var Lib_123Node14startCompspts = [Lib_123Node14compspts[0],Lib_123Node14compspts[1],0,0];
  1433. Lib_123Node14.setImage(GD.getPolyLineJSON());
  1434. Lib_123Node14.setPosition(Lib_123Node14rect.x+Lib_123Node14rect.width/2,Lib_123Node14rect.y+Lib_123Node14rect.height/2);
  1435. Lib_123Node14.setSize(Lib_123Node14rect.width,Lib_123Node14rect.height);
  1436. Lib_123Node14.setStyle("opacity",1);
  1437. Lib_123Node14.s({'pixelPerfect':true});
  1438. Lib_123Node14borderwidth=2;
  1439. Lib_123Node14.setRotation(0);
  1440. dataModel.add(Lib_123Node14);
  1441. Lib_123Node14.a('node.points',Lib_123Node14compspts);
  1442. Lib_123Node14.a('node.segments',[1,2]);
  1443. Lib_123Node14.a('node.color','rgba(255,0,255,1)');
  1444. Lib_123Node14.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1445. Lib_123Node14.a('node.borderColor','rgba(255,0,255,1)');
  1446. Lib_123Node14.a('node.background','rgba(255,0,255,1)');
  1447. Lib_123Node14.a('node.gradient','');
  1448. Lib_123Node14.a('node.gradientcolor','rgba(255,0,255,1)');
  1449. Lib_123Node14.a('node.endCompspts',Lib_123Node14endCompspts);
  1450. Lib_123Node14.a('node.startCompspts',Lib_123Node14startCompspts);
  1451. (function (node, img, compspts, endCompspts, startCompspts) {
  1452. var position = node.getPosition(),
  1453. w = node.getWidth()*_ratio.ratioX,
  1454. h = node.getHeight()*_ratio.ratioY;
  1455. function resetPoints(rx, ry) {
  1456. for (var i = 0, len = compspts.length; i < len; i++) {
  1457. if (i%2 === 0) {
  1458. compspts[i]*=rx;
  1459. } else {
  1460. compspts[i]*=ry;
  1461. }
  1462. }
  1463. endCompspts[0] = compspts[compspts.length-2];
  1464. endCompspts[1] = compspts[compspts.length-1];
  1465. endCompspts[2] *= rx;
  1466. endCompspts[3] *= ry;
  1467. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1468. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1469. startCompspts[0] = compspts[0];
  1470. startCompspts[1] = compspts[1];
  1471. startCompspts[2] *= rx;
  1472. startCompspts[3] *= ry;
  1473. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1474. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1475. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1476. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1477. }
  1478. node.setSize(w, h);
  1479. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1480. node.a('node.width', w);
  1481. node.a('node.height', h);
  1482. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1483. node.borderWidth = 2;
  1484. node.a('node.borderwidth',node.borderWidth);
  1485. node._nodename = 'Lib_123Node14';
  1486. node._nodeType = 'line';
  1487. zoomNodeList.push({
  1488. node: node,
  1489. attr: 'node.borderwidth'
  1490. });
  1491. var setWidth = node.setWidth,
  1492. setHeight = node.setHeight,
  1493. timer, rx = 1, ry = 1;
  1494. node.setWidth = function (width) {
  1495. var _width = this.getWidth();
  1496. rx = width / _width;
  1497. node.a('node.width', width);
  1498. setWidth.apply(this, arguments);
  1499. resetPoints(rx, 1);
  1500. }
  1501. node.setHeight = function (height) {
  1502. var _height = this.getHeight();
  1503. ry = height / _height;
  1504. node.a('node.height', height);
  1505. setHeight.apply(this, arguments);
  1506. resetPoints(1, ry);
  1507. }
  1508. })(Lib_123Node14, Lib_123Node14.getImage(), Lib_123Node14compspts, Lib_123Node14endCompspts, Lib_123Node14startCompspts);
  1509. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  1510. var Lib_123Node15type = 'oval';
  1511. var Lib_123Node15 = new ht.Node(),
  1512. Lib_123Node15BorderWidth = 2*2;
  1513. if (Lib_123Node15type === 'arc') {
  1514. Lib_123Node15BorderWidth *= 2;
  1515. }
  1516. Lib_123Node15.setImage(GD.getRectJSON(24.12697*_ratio.ratioX, 20.63269*_ratio.ratioY, Lib_123Node15type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  1517. Lib_123Node15.setPosition(29*ratio.ratioX, 35*ratio.ratioY);
  1518. Lib_123Node15.setSize(24.12697*_ratio.ratioX, 20.63269*_ratio.ratioY);
  1519. Lib_123Node15.s({
  1520. 'pixelPerfect':true
  1521. /*@AddPara@*/
  1522. });
  1523. Lib_123Node15.a('node.width', 24.12697*_ratio.ratioX);
  1524. Lib_123Node15.a('node.height', 20.63269*_ratio.ratioY);
  1525. Lib_123Node15.a('node.type', Lib_123Node15type);
  1526. Lib_123Node15.a('node.rect', [0, 0, 24.12697*_ratio.ratioX, 20.63269*_ratio.ratioY]);
  1527. Lib_123Node15.a('node.background', 'rgba(255,255,255,0.003921569)');
  1528. Lib_123Node15.a('node.gradientcolor', '');
  1529. Lib_123Node15.a('node.gradient', '');
  1530. Lib_123Node15.a('node.borderwidth', Lib_123Node15BorderWidth);
  1531. Lib_123Node15.a('node.color', 'rgba(255,0,255,1)');
  1532. Lib_123Node15.a('node.fillrect', [0,0,0,0]);
  1533. Lib_123Node15.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  1534. Lib_123Node15.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  1535. Lib_123Node15.a('node.fillgradient', '');
  1536. if (Lib_123Node15type !== 'rect') {
  1537. Lib_123Node15.a('node.arcFrom', parseFloat('@arcFrom@'));
  1538. Lib_123Node15.a('node.arcTo', parseFloat('@arcTo@'));
  1539. Lib_123Node15.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  1540. }
  1541. if (Lib_123Node15type === 'arc') {
  1542. Lib_123Node15.a('node.arcOval', true);
  1543. }
  1544. Lib_123Node15.setRotation(0*Math.PI/180);
  1545. Lib_123Node15.borderWidth = Lib_123Node15BorderWidth;
  1546. Lib_123Node15.borderFillwidth = Lib_123Node15BorderWidth;
  1547. dataModel.add(Lib_123Node15);
  1548. Lib_123Node15._nodename = 'Lib_123Node15'
  1549. Lib_123Node15._nodeType = 'rect';
  1550. zoomNodeList.push({
  1551. node: Lib_123Node15,
  1552. attr: 'node.borderwidth'
  1553. });
  1554. (function (node, _img) {
  1555. var setWidth = node.setWidth,
  1556. setHeight = node.setHeight;
  1557. node.setWidth = function (width) {
  1558. if (width === this.getWidth()) return ;
  1559. var height = this.getHeight();
  1560. this.a('node.width', width);
  1561. this.a('node.rect', [0,0,width, height]);
  1562. setWidth.apply(this, arguments);
  1563. }
  1564. node.setHeight = function (height) {
  1565. if (height === this.getHeight()) return ;
  1566. var width = this.getWidth();
  1567. this.a('node.height', height);
  1568. this.a('node.rect', [0,0,width, height]);
  1569. setHeight.apply(this, arguments);
  1570. }
  1571. })(Lib_123Node15, Lib_123Node15.getImage());var Lib_123Node16points=[29, 29,29, 35],
  1572. Lib_123Node16rect=ht.Default.unionPoint([{x:29,y:29},{x:29,y:35}]),
  1573. Lib_123Node16compspts=[];
  1574. _ratio = GD.getRatioWithRotation(0, ratio);
  1575. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  1576. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  1577. for(var i=0;i<Lib_123Node16points.length;i++){
  1578. if(i%2==0){
  1579. Lib_123Node16compspts.push(Lib_123Node16points[i]-Lib_123Node16rect.x);
  1580. }else{
  1581. Lib_123Node16compspts.push(Lib_123Node16points[i]-Lib_123Node16rect.y);
  1582. }
  1583. }
  1584. var Lib_123Node16ptslength=Lib_123Node16compspts.length;
  1585. if (Lib_123Node16rect.height === 0) {
  1586. Lib_123Node16compspts[0] -= 0;
  1587. Lib_123Node16compspts[Lib_123Node16ptslength-2] += 0;
  1588. } else if (Lib_123Node16rect.width === 0){
  1589. Lib_123Node16compspts[1] -= 0;
  1590. Lib_123Node16compspts[Lib_123Node16ptslength-1] += 0;
  1591. } else {
  1592. Lib_123Node16compspts[0] -= 0;
  1593. Lib_123Node16compspts[1] -= 0;
  1594. Lib_123Node16compspts[Lib_123Node16ptslength-2] += 0;
  1595. Lib_123Node16compspts[Lib_123Node16ptslength-1] += 0;
  1596. }
  1597. Lib_123Node16 = new ht.Node();
  1598. Lib_123Node16.borderWidth = 2;
  1599. Lib_123Node16rect.width = Lib_123Node16rect.width === 0 ? 0.0001 : Lib_123Node16rect.width;
  1600. Lib_123Node16rect.height = Lib_123Node16rect.height === 0 ? 0.0001 : Lib_123Node16rect.height;
  1601. var Lib_123Node16endCompspts = [Lib_123Node16compspts[Lib_123Node16ptslength-2],Lib_123Node16compspts[Lib_123Node16ptslength-1],0,0];
  1602. var Lib_123Node16startCompspts = [Lib_123Node16compspts[0],Lib_123Node16compspts[1],0,0];
  1603. Lib_123Node16.setImage(GD.getPolyLineJSON());
  1604. Lib_123Node16.setPosition(Lib_123Node16rect.x+Lib_123Node16rect.width/2,Lib_123Node16rect.y+Lib_123Node16rect.height/2);
  1605. Lib_123Node16.setSize(Lib_123Node16rect.width,Lib_123Node16rect.height);
  1606. Lib_123Node16.setStyle("opacity",1);
  1607. Lib_123Node16.s({'pixelPerfect':true});
  1608. Lib_123Node16borderwidth=2;
  1609. Lib_123Node16.setRotation(0);
  1610. dataModel.add(Lib_123Node16);
  1611. Lib_123Node16.a('node.points',Lib_123Node16compspts);
  1612. Lib_123Node16.a('node.segments',[1,2]);
  1613. Lib_123Node16.a('node.color','rgba(255,0,255,1)');
  1614. Lib_123Node16.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1615. Lib_123Node16.a('node.borderColor','rgba(255,0,255,1)');
  1616. Lib_123Node16.a('node.background','rgba(255,0,255,1)');
  1617. Lib_123Node16.a('node.gradient','');
  1618. Lib_123Node16.a('node.gradientcolor','rgba(255,0,255,1)');
  1619. Lib_123Node16.a('node.endCompspts',Lib_123Node16endCompspts);
  1620. Lib_123Node16.a('node.startCompspts',Lib_123Node16startCompspts);
  1621. (function (node, img, compspts, endCompspts, startCompspts) {
  1622. var position = node.getPosition(),
  1623. w = node.getWidth()*_ratio.ratioX,
  1624. h = node.getHeight()*_ratio.ratioY;
  1625. function resetPoints(rx, ry) {
  1626. for (var i = 0, len = compspts.length; i < len; i++) {
  1627. if (i%2 === 0) {
  1628. compspts[i]*=rx;
  1629. } else {
  1630. compspts[i]*=ry;
  1631. }
  1632. }
  1633. endCompspts[0] = compspts[compspts.length-2];
  1634. endCompspts[1] = compspts[compspts.length-1];
  1635. endCompspts[2] *= rx;
  1636. endCompspts[3] *= ry;
  1637. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1638. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1639. startCompspts[0] = compspts[0];
  1640. startCompspts[1] = compspts[1];
  1641. startCompspts[2] *= rx;
  1642. startCompspts[3] *= ry;
  1643. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1644. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1645. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1646. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1647. }
  1648. node.setSize(w, h);
  1649. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1650. node.a('node.width', w);
  1651. node.a('node.height', h);
  1652. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1653. node.borderWidth = 2;
  1654. node.a('node.borderwidth',node.borderWidth);
  1655. node._nodename = 'Lib_123Node16';
  1656. node._nodeType = 'line';
  1657. zoomNodeList.push({
  1658. node: node,
  1659. attr: 'node.borderwidth'
  1660. });
  1661. var setWidth = node.setWidth,
  1662. setHeight = node.setHeight,
  1663. timer, rx = 1, ry = 1;
  1664. node.setWidth = function (width) {
  1665. var _width = this.getWidth();
  1666. rx = width / _width;
  1667. node.a('node.width', width);
  1668. setWidth.apply(this, arguments);
  1669. resetPoints(rx, 1);
  1670. }
  1671. node.setHeight = function (height) {
  1672. var _height = this.getHeight();
  1673. ry = height / _height;
  1674. node.a('node.height', height);
  1675. setHeight.apply(this, arguments);
  1676. resetPoints(1, ry);
  1677. }
  1678. })(Lib_123Node16, Lib_123Node16.getImage(), Lib_123Node16compspts, Lib_123Node16endCompspts, Lib_123Node16startCompspts);
  1679. var Lib_123Node17points=[29, 35,35, 40],
  1680. Lib_123Node17rect=ht.Default.unionPoint([{x:29,y:35},{x:35,y:40}]),
  1681. Lib_123Node17compspts=[];
  1682. _ratio = GD.getRatioWithRotation(0, ratio);
  1683. var _startratio = GD.getRatioWithRotation(3.83633091806099, ratio),
  1684. _endratio = GD.getRatioWithRotation(0.694738264471199, ratio);
  1685. for(var i=0;i<Lib_123Node17points.length;i++){
  1686. if(i%2==0){
  1687. Lib_123Node17compspts.push(Lib_123Node17points[i]-Lib_123Node17rect.x);
  1688. }else{
  1689. Lib_123Node17compspts.push(Lib_123Node17points[i]-Lib_123Node17rect.y);
  1690. }
  1691. }
  1692. var Lib_123Node17ptslength=Lib_123Node17compspts.length;
  1693. if (Lib_123Node17rect.height === 0) {
  1694. Lib_123Node17compspts[0] -= 0;
  1695. Lib_123Node17compspts[Lib_123Node17ptslength-2] += 0;
  1696. } else if (Lib_123Node17rect.width === 0){
  1697. Lib_123Node17compspts[1] -= 0;
  1698. Lib_123Node17compspts[Lib_123Node17ptslength-1] += 0;
  1699. } else {
  1700. Lib_123Node17compspts[0] -= 0;
  1701. Lib_123Node17compspts[1] -= 0;
  1702. Lib_123Node17compspts[Lib_123Node17ptslength-2] += 0;
  1703. Lib_123Node17compspts[Lib_123Node17ptslength-1] += 0;
  1704. }
  1705. Lib_123Node17 = new ht.Node();
  1706. Lib_123Node17.borderWidth = 2;
  1707. Lib_123Node17rect.width = Lib_123Node17rect.width === 0 ? 0.0001 : Lib_123Node17rect.width;
  1708. Lib_123Node17rect.height = Lib_123Node17rect.height === 0 ? 0.0001 : Lib_123Node17rect.height;
  1709. var Lib_123Node17endCompspts = [Lib_123Node17compspts[Lib_123Node17ptslength-2],Lib_123Node17compspts[Lib_123Node17ptslength-1],0,0];
  1710. var Lib_123Node17startCompspts = [Lib_123Node17compspts[0],Lib_123Node17compspts[1],0,0];
  1711. Lib_123Node17.setImage(GD.getPolyLineJSON());
  1712. Lib_123Node17.setPosition(Lib_123Node17rect.x+Lib_123Node17rect.width/2,Lib_123Node17rect.y+Lib_123Node17rect.height/2);
  1713. Lib_123Node17.setSize(Lib_123Node17rect.width,Lib_123Node17rect.height);
  1714. Lib_123Node17.setStyle("opacity",1);
  1715. Lib_123Node17.s({'pixelPerfect':true});
  1716. Lib_123Node17borderwidth=2;
  1717. Lib_123Node17.setRotation(0);
  1718. dataModel.add(Lib_123Node17);
  1719. Lib_123Node17.a('node.points',Lib_123Node17compspts);
  1720. Lib_123Node17.a('node.segments',[1,2]);
  1721. Lib_123Node17.a('node.color','rgba(255,0,255,1)');
  1722. Lib_123Node17.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1723. Lib_123Node17.a('node.borderColor','rgba(255,0,255,1)');
  1724. Lib_123Node17.a('node.background','rgba(255,0,255,1)');
  1725. Lib_123Node17.a('node.gradient','');
  1726. Lib_123Node17.a('node.gradientcolor','rgba(255,0,255,1)');
  1727. Lib_123Node17.a('node.endCompspts',Lib_123Node17endCompspts);
  1728. Lib_123Node17.a('node.startCompspts',Lib_123Node17startCompspts);
  1729. (function (node, img, compspts, endCompspts, startCompspts) {
  1730. var position = node.getPosition(),
  1731. w = node.getWidth()*_ratio.ratioX,
  1732. h = node.getHeight()*_ratio.ratioY;
  1733. function resetPoints(rx, ry) {
  1734. for (var i = 0, len = compspts.length; i < len; i++) {
  1735. if (i%2 === 0) {
  1736. compspts[i]*=rx;
  1737. } else {
  1738. compspts[i]*=ry;
  1739. }
  1740. }
  1741. endCompspts[0] = compspts[compspts.length-2];
  1742. endCompspts[1] = compspts[compspts.length-1];
  1743. endCompspts[2] *= rx;
  1744. endCompspts[3] *= ry;
  1745. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1746. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1747. startCompspts[0] = compspts[0];
  1748. startCompspts[1] = compspts[1];
  1749. startCompspts[2] *= rx;
  1750. startCompspts[3] *= ry;
  1751. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1752. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1753. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1754. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1755. }
  1756. node.setSize(w, h);
  1757. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1758. node.a('node.width', w);
  1759. node.a('node.height', h);
  1760. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1761. node.borderWidth = 2;
  1762. node.a('node.borderwidth',node.borderWidth);
  1763. node._nodename = 'Lib_123Node17';
  1764. node._nodeType = 'line';
  1765. zoomNodeList.push({
  1766. node: node,
  1767. attr: 'node.borderwidth'
  1768. });
  1769. var setWidth = node.setWidth,
  1770. setHeight = node.setHeight,
  1771. timer, rx = 1, ry = 1;
  1772. node.setWidth = function (width) {
  1773. var _width = this.getWidth();
  1774. rx = width / _width;
  1775. node.a('node.width', width);
  1776. setWidth.apply(this, arguments);
  1777. resetPoints(rx, 1);
  1778. }
  1779. node.setHeight = function (height) {
  1780. var _height = this.getHeight();
  1781. ry = height / _height;
  1782. node.a('node.height', height);
  1783. setHeight.apply(this, arguments);
  1784. resetPoints(1, ry);
  1785. }
  1786. })(Lib_123Node17, Lib_123Node17.getImage(), Lib_123Node17compspts, Lib_123Node17endCompspts, Lib_123Node17startCompspts);
  1787. var Lib_123Node18points=[29, 35,23, 40],
  1788. Lib_123Node18rect=ht.Default.unionPoint([{x:29,y:35},{x:23,y:40}]),
  1789. Lib_123Node18compspts=[];
  1790. _ratio = GD.getRatioWithRotation(0, ratio);
  1791. var _startratio = GD.getRatioWithRotation(-0.694738264471199, ratio),
  1792. _endratio = GD.getRatioWithRotation(2.44685438911859, ratio);
  1793. for(var i=0;i<Lib_123Node18points.length;i++){
  1794. if(i%2==0){
  1795. Lib_123Node18compspts.push(Lib_123Node18points[i]-Lib_123Node18rect.x);
  1796. }else{
  1797. Lib_123Node18compspts.push(Lib_123Node18points[i]-Lib_123Node18rect.y);
  1798. }
  1799. }
  1800. var Lib_123Node18ptslength=Lib_123Node18compspts.length;
  1801. if (Lib_123Node18rect.height === 0) {
  1802. Lib_123Node18compspts[0] -= 0;
  1803. Lib_123Node18compspts[Lib_123Node18ptslength-2] += 0;
  1804. } else if (Lib_123Node18rect.width === 0){
  1805. Lib_123Node18compspts[1] -= 0;
  1806. Lib_123Node18compspts[Lib_123Node18ptslength-1] += 0;
  1807. } else {
  1808. Lib_123Node18compspts[0] -= 0;
  1809. Lib_123Node18compspts[1] -= 0;
  1810. Lib_123Node18compspts[Lib_123Node18ptslength-2] += 0;
  1811. Lib_123Node18compspts[Lib_123Node18ptslength-1] += 0;
  1812. }
  1813. Lib_123Node18 = new ht.Node();
  1814. Lib_123Node18.borderWidth = 2;
  1815. Lib_123Node18rect.width = Lib_123Node18rect.width === 0 ? 0.0001 : Lib_123Node18rect.width;
  1816. Lib_123Node18rect.height = Lib_123Node18rect.height === 0 ? 0.0001 : Lib_123Node18rect.height;
  1817. var Lib_123Node18endCompspts = [Lib_123Node18compspts[Lib_123Node18ptslength-2],Lib_123Node18compspts[Lib_123Node18ptslength-1],0,0];
  1818. var Lib_123Node18startCompspts = [Lib_123Node18compspts[0],Lib_123Node18compspts[1],0,0];
  1819. Lib_123Node18.setImage(GD.getPolyLineJSON());
  1820. Lib_123Node18.setPosition(Lib_123Node18rect.x+Lib_123Node18rect.width/2,Lib_123Node18rect.y+Lib_123Node18rect.height/2);
  1821. Lib_123Node18.setSize(Lib_123Node18rect.width,Lib_123Node18rect.height);
  1822. Lib_123Node18.setStyle("opacity",1);
  1823. Lib_123Node18.s({'pixelPerfect':true});
  1824. Lib_123Node18borderwidth=2;
  1825. Lib_123Node18.setRotation(0);
  1826. dataModel.add(Lib_123Node18);
  1827. Lib_123Node18.a('node.points',Lib_123Node18compspts);
  1828. Lib_123Node18.a('node.segments',[1,2]);
  1829. Lib_123Node18.a('node.color','rgba(255,0,255,1)');
  1830. Lib_123Node18.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1831. Lib_123Node18.a('node.borderColor','rgba(255,0,255,1)');
  1832. Lib_123Node18.a('node.background','rgba(255,0,255,1)');
  1833. Lib_123Node18.a('node.gradient','');
  1834. Lib_123Node18.a('node.gradientcolor','rgba(255,0,255,1)');
  1835. Lib_123Node18.a('node.endCompspts',Lib_123Node18endCompspts);
  1836. Lib_123Node18.a('node.startCompspts',Lib_123Node18startCompspts);
  1837. (function (node, img, compspts, endCompspts, startCompspts) {
  1838. var position = node.getPosition(),
  1839. w = node.getWidth()*_ratio.ratioX,
  1840. h = node.getHeight()*_ratio.ratioY;
  1841. function resetPoints(rx, ry) {
  1842. for (var i = 0, len = compspts.length; i < len; i++) {
  1843. if (i%2 === 0) {
  1844. compspts[i]*=rx;
  1845. } else {
  1846. compspts[i]*=ry;
  1847. }
  1848. }
  1849. endCompspts[0] = compspts[compspts.length-2];
  1850. endCompspts[1] = compspts[compspts.length-1];
  1851. endCompspts[2] *= rx;
  1852. endCompspts[3] *= ry;
  1853. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1854. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1855. startCompspts[0] = compspts[0];
  1856. startCompspts[1] = compspts[1];
  1857. startCompspts[2] *= rx;
  1858. startCompspts[3] *= ry;
  1859. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1860. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1861. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1862. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1863. }
  1864. node.setSize(w, h);
  1865. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1866. node.a('node.width', w);
  1867. node.a('node.height', h);
  1868. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1869. node.borderWidth = 2;
  1870. node.a('node.borderwidth',node.borderWidth);
  1871. node._nodename = 'Lib_123Node18';
  1872. node._nodeType = 'line';
  1873. zoomNodeList.push({
  1874. node: node,
  1875. attr: 'node.borderwidth'
  1876. });
  1877. var setWidth = node.setWidth,
  1878. setHeight = node.setHeight,
  1879. timer, rx = 1, ry = 1;
  1880. node.setWidth = function (width) {
  1881. var _width = this.getWidth();
  1882. rx = width / _width;
  1883. node.a('node.width', width);
  1884. setWidth.apply(this, arguments);
  1885. resetPoints(rx, 1);
  1886. }
  1887. node.setHeight = function (height) {
  1888. var _height = this.getHeight();
  1889. ry = height / _height;
  1890. node.a('node.height', height);
  1891. setHeight.apply(this, arguments);
  1892. resetPoints(1, ry);
  1893. }
  1894. })(Lib_123Node18, Lib_123Node18.getImage(), Lib_123Node18compspts, Lib_123Node18endCompspts, Lib_123Node18startCompspts);
  1895. /*@GraphList@*/
  1896. /*@PageInit@*/
  1897. var localVarObj = this.localVarObj;
  1898. var localDynamicVarObj = this.localDynamicVar();
  1899. this['Lib_123Node0'] = Lib_123Node0;
  1900. Lib_123Node0.__parentLib = nodename;
  1901. Lib_123Node0.__parent = this;
  1902. this.childNodes.push(Lib_123Node0);
  1903. this['Lib_123Node1'] = Lib_123Node1;
  1904. Lib_123Node1.__parentLib = nodename;
  1905. Lib_123Node1.__parent = this;
  1906. this.childNodes.push(Lib_123Node1);
  1907. this['Lib_123Node2'] = Lib_123Node2;
  1908. Lib_123Node2.__parentLib = nodename;
  1909. Lib_123Node2.__parent = this;
  1910. this.childNodes.push(Lib_123Node2);
  1911. this['Lib_123Node3'] = Lib_123Node3;
  1912. Lib_123Node3.__parentLib = nodename;
  1913. Lib_123Node3.__parent = this;
  1914. this.childNodes.push(Lib_123Node3);
  1915. this['Lib_123Node4'] = Lib_123Node4;
  1916. Lib_123Node4.__parentLib = nodename;
  1917. Lib_123Node4.__parent = this;
  1918. this.childNodes.push(Lib_123Node4);
  1919. this['Lib_123Node5'] = Lib_123Node5;
  1920. Lib_123Node5.__parentLib = nodename;
  1921. Lib_123Node5.__parent = this;
  1922. this.childNodes.push(Lib_123Node5);
  1923. this['Lib_123Node6'] = Lib_123Node6;
  1924. Lib_123Node6.__parentLib = nodename;
  1925. Lib_123Node6.__parent = this;
  1926. this.childNodes.push(Lib_123Node6);
  1927. this['Lib_123Node7'] = Lib_123Node7;
  1928. Lib_123Node7.__parentLib = nodename;
  1929. Lib_123Node7.__parent = this;
  1930. this.childNodes.push(Lib_123Node7);
  1931. this['Lib_123Node8'] = Lib_123Node8;
  1932. Lib_123Node8.__parentLib = nodename;
  1933. Lib_123Node8.__parent = this;
  1934. this.childNodes.push(Lib_123Node8);
  1935. this['Lib_123Node9'] = Lib_123Node9;
  1936. Lib_123Node9.__parentLib = nodename;
  1937. Lib_123Node9.__parent = this;
  1938. this.childNodes.push(Lib_123Node9);
  1939. this['Lib_123Node10'] = Lib_123Node10;
  1940. Lib_123Node10.__parentLib = nodename;
  1941. Lib_123Node10.__parent = this;
  1942. this.childNodes.push(Lib_123Node10);
  1943. this['Lib_123Node11'] = Lib_123Node11;
  1944. Lib_123Node11.__parentLib = nodename;
  1945. Lib_123Node11.__parent = this;
  1946. this.childNodes.push(Lib_123Node11);
  1947. this['Lib_123Node12'] = Lib_123Node12;
  1948. Lib_123Node12.__parentLib = nodename;
  1949. Lib_123Node12.__parent = this;
  1950. this.childNodes.push(Lib_123Node12);
  1951. this['Lib_123Node13'] = Lib_123Node13;
  1952. Lib_123Node13.__parentLib = nodename;
  1953. Lib_123Node13.__parent = this;
  1954. this.childNodes.push(Lib_123Node13);
  1955. this['Lib_123Node14'] = Lib_123Node14;
  1956. Lib_123Node14.__parentLib = nodename;
  1957. Lib_123Node14.__parent = this;
  1958. this.childNodes.push(Lib_123Node14);
  1959. this['Lib_123Node15'] = Lib_123Node15;
  1960. Lib_123Node15.__parentLib = nodename;
  1961. Lib_123Node15.__parent = this;
  1962. this.childNodes.push(Lib_123Node15);
  1963. this['Lib_123Node16'] = Lib_123Node16;
  1964. Lib_123Node16.__parentLib = nodename;
  1965. Lib_123Node16.__parent = this;
  1966. this.childNodes.push(Lib_123Node16);
  1967. this['Lib_123Node17'] = Lib_123Node17;
  1968. Lib_123Node17.__parentLib = nodename;
  1969. Lib_123Node17.__parent = this;
  1970. this.childNodes.push(Lib_123Node17);
  1971. this['Lib_123Node18'] = Lib_123Node18;
  1972. Lib_123Node18.__parentLib = nodename;
  1973. Lib_123Node18.__parent = this;
  1974. this.childNodes.push(Lib_123Node18);
  1975. /*@ControlContextMenu@*/
  1976. /*@Declare@*/
  1977. this.init(x, y, width, height, angle);
  1978. };
  1979. ht.Default.def('ht.lib.123', Object, {
  1980. refresh10ms: function () {
  1981. var localVarObj = this.localVarObj;
  1982. var localDynamicVarObj = this.localDynamicVar();
  1983. var Lib_123Node0= this.Lib_123Node0;
  1984. var Lib_123Node1= this.Lib_123Node1;
  1985. var Lib_123Node2= this.Lib_123Node2;
  1986. var Lib_123Node3= this.Lib_123Node3;
  1987. var Lib_123Node4= this.Lib_123Node4;
  1988. var Lib_123Node5= this.Lib_123Node5;
  1989. var Lib_123Node6= this.Lib_123Node6;
  1990. var Lib_123Node7= this.Lib_123Node7;
  1991. var Lib_123Node8= this.Lib_123Node8;
  1992. var Lib_123Node9= this.Lib_123Node9;
  1993. var Lib_123Node10= this.Lib_123Node10;
  1994. var Lib_123Node11= this.Lib_123Node11;
  1995. var Lib_123Node12= this.Lib_123Node12;
  1996. var Lib_123Node13= this.Lib_123Node13;
  1997. var Lib_123Node14= this.Lib_123Node14;
  1998. var Lib_123Node15= this.Lib_123Node15;
  1999. var Lib_123Node16= this.Lib_123Node16;
  2000. var Lib_123Node17= this.Lib_123Node17;
  2001. var Lib_123Node18= this.Lib_123Node18;
  2002. /*@refresh10ms@*/
  2003. },
  2004. refresh100ms: function () {
  2005. var localVarObj = this.localVarObj;
  2006. var localDynamicVarObj = this.localDynamicVar();
  2007. var Lib_123Node0= this.Lib_123Node0;
  2008. var Lib_123Node1= this.Lib_123Node1;
  2009. var Lib_123Node2= this.Lib_123Node2;
  2010. var Lib_123Node3= this.Lib_123Node3;
  2011. var Lib_123Node4= this.Lib_123Node4;
  2012. var Lib_123Node5= this.Lib_123Node5;
  2013. var Lib_123Node6= this.Lib_123Node6;
  2014. var Lib_123Node7= this.Lib_123Node7;
  2015. var Lib_123Node8= this.Lib_123Node8;
  2016. var Lib_123Node9= this.Lib_123Node9;
  2017. var Lib_123Node10= this.Lib_123Node10;
  2018. var Lib_123Node11= this.Lib_123Node11;
  2019. var Lib_123Node12= this.Lib_123Node12;
  2020. var Lib_123Node13= this.Lib_123Node13;
  2021. var Lib_123Node14= this.Lib_123Node14;
  2022. var Lib_123Node15= this.Lib_123Node15;
  2023. var Lib_123Node16= this.Lib_123Node16;
  2024. var Lib_123Node17= this.Lib_123Node17;
  2025. var Lib_123Node18= this.Lib_123Node18;
  2026. /*@refresh100ms@*/
  2027. },
  2028. refresh500ms: function () {
  2029. var localVarObj = this.localVarObj;
  2030. var localDynamicVarObj = this.localDynamicVar();
  2031. var Lib_123Node0= this.Lib_123Node0;
  2032. var Lib_123Node1= this.Lib_123Node1;
  2033. var Lib_123Node2= this.Lib_123Node2;
  2034. var Lib_123Node3= this.Lib_123Node3;
  2035. var Lib_123Node4= this.Lib_123Node4;
  2036. var Lib_123Node5= this.Lib_123Node5;
  2037. var Lib_123Node6= this.Lib_123Node6;
  2038. var Lib_123Node7= this.Lib_123Node7;
  2039. var Lib_123Node8= this.Lib_123Node8;
  2040. var Lib_123Node9= this.Lib_123Node9;
  2041. var Lib_123Node10= this.Lib_123Node10;
  2042. var Lib_123Node11= this.Lib_123Node11;
  2043. var Lib_123Node12= this.Lib_123Node12;
  2044. var Lib_123Node13= this.Lib_123Node13;
  2045. var Lib_123Node14= this.Lib_123Node14;
  2046. var Lib_123Node15= this.Lib_123Node15;
  2047. var Lib_123Node16= this.Lib_123Node16;
  2048. var Lib_123Node17= this.Lib_123Node17;
  2049. var Lib_123Node18= this.Lib_123Node18;
  2050. /*@refresh500ms@*/
  2051. },
  2052. refresh1s: function () {
  2053. var Counter1s = arguments[0] || 0;
  2054. var localVarObj = this.localVarObj;
  2055. var localDynamicVarObj = this.localDynamicVar();
  2056. var Lib_123Node0= this.Lib_123Node0;
  2057. var Lib_123Node1= this.Lib_123Node1;
  2058. var Lib_123Node2= this.Lib_123Node2;
  2059. var Lib_123Node3= this.Lib_123Node3;
  2060. var Lib_123Node4= this.Lib_123Node4;
  2061. var Lib_123Node5= this.Lib_123Node5;
  2062. var Lib_123Node6= this.Lib_123Node6;
  2063. var Lib_123Node7= this.Lib_123Node7;
  2064. var Lib_123Node8= this.Lib_123Node8;
  2065. var Lib_123Node9= this.Lib_123Node9;
  2066. var Lib_123Node10= this.Lib_123Node10;
  2067. var Lib_123Node11= this.Lib_123Node11;
  2068. var Lib_123Node12= this.Lib_123Node12;
  2069. var Lib_123Node13= this.Lib_123Node13;
  2070. var Lib_123Node14= this.Lib_123Node14;
  2071. var Lib_123Node15= this.Lib_123Node15;
  2072. var Lib_123Node16= this.Lib_123Node16;
  2073. var Lib_123Node17= this.Lib_123Node17;
  2074. var Lib_123Node18= this.Lib_123Node18;
  2075. /*@refresh1s@*/
  2076. },
  2077. refresh5s: function () {
  2078. var localVarObj = this.localVarObj;
  2079. var localDynamicVarObj = this.localDynamicVar();
  2080. var Lib_123Node0= this.Lib_123Node0;
  2081. var Lib_123Node1= this.Lib_123Node1;
  2082. var Lib_123Node2= this.Lib_123Node2;
  2083. var Lib_123Node3= this.Lib_123Node3;
  2084. var Lib_123Node4= this.Lib_123Node4;
  2085. var Lib_123Node5= this.Lib_123Node5;
  2086. var Lib_123Node6= this.Lib_123Node6;
  2087. var Lib_123Node7= this.Lib_123Node7;
  2088. var Lib_123Node8= this.Lib_123Node8;
  2089. var Lib_123Node9= this.Lib_123Node9;
  2090. var Lib_123Node10= this.Lib_123Node10;
  2091. var Lib_123Node11= this.Lib_123Node11;
  2092. var Lib_123Node12= this.Lib_123Node12;
  2093. var Lib_123Node13= this.Lib_123Node13;
  2094. var Lib_123Node14= this.Lib_123Node14;
  2095. var Lib_123Node15= this.Lib_123Node15;
  2096. var Lib_123Node16= this.Lib_123Node16;
  2097. var Lib_123Node17= this.Lib_123Node17;
  2098. var Lib_123Node18= this.Lib_123Node18;
  2099. /*@refresh5s@*/
  2100. },
  2101. /*@PageDynamic@*/
  2102. onEvent: function (e, data, type, origin, offset, objMouseOn, ctm) {
  2103. var localVarObj = this.localVarObj;
  2104. var localDynamicVarObj = this.localDynamicVar();
  2105. var Lib_123Node0= this.Lib_123Node0;
  2106. var Lib_123Node1= this.Lib_123Node1;
  2107. var Lib_123Node2= this.Lib_123Node2;
  2108. var Lib_123Node3= this.Lib_123Node3;
  2109. var Lib_123Node4= this.Lib_123Node4;
  2110. var Lib_123Node5= this.Lib_123Node5;
  2111. var Lib_123Node6= this.Lib_123Node6;
  2112. var Lib_123Node7= this.Lib_123Node7;
  2113. var Lib_123Node8= this.Lib_123Node8;
  2114. var Lib_123Node9= this.Lib_123Node9;
  2115. var Lib_123Node10= this.Lib_123Node10;
  2116. var Lib_123Node11= this.Lib_123Node11;
  2117. var Lib_123Node12= this.Lib_123Node12;
  2118. var Lib_123Node13= this.Lib_123Node13;
  2119. var Lib_123Node14= this.Lib_123Node14;
  2120. var Lib_123Node15= this.Lib_123Node15;
  2121. var Lib_123Node16= this.Lib_123Node16;
  2122. var Lib_123Node17= this.Lib_123Node17;
  2123. var Lib_123Node18= this.Lib_123Node18;
  2124. if (type === 'click') {
  2125. /*@EvnentClicked@*/
  2126. } else if (type === 'mousedown') {
  2127. mouseX=e.clientX;
  2128. mouseY=e.clientY;
  2129. /*@EvnentMouseDown@*/
  2130. } else if (type === 'mouseup') {
  2131. /*@EvnentMouseUp@*/
  2132. } else if (type === 'mousemove') {
  2133. var mouseX, mouseY, position, zoom;
  2134. position=origin.getLogicalPoint(e);
  2135. zoom = graphView.getZoom();
  2136. if (origin === graphView) {
  2137. mouseX= position.x + origin.tx();
  2138. mouseY = position.y + origin.ty();
  2139. } else {
  2140. offset = offset || {x: 0, y: 0};
  2141. mouseX = position.x / zoom + offset.x + origin.tx();
  2142. mouseY = position.y / zoom + offset.y + origin.ty();
  2143. }
  2144. /*@EvnentMouseLeave@*/
  2145. /*@EvnentMouseOver@*/
  2146. } else if (type === 'keydown') {
  2147. /*@EvnentKeyDown@*/
  2148. } else if (type === 'contextmenu') {
  2149. /*@Declare@*/
  2150. /*@SetNodeContextMenu@*/
  2151. /*@SetPageContextMenu@*/
  2152. }
  2153. /*@LibEvent@*/
  2154. },
  2155. getBaseClass: function () {
  2156. return this._baseClass;
  2157. },
  2158. getWidth: function () {
  2159. return this._width;
  2160. },
  2161. getHeight: function () {
  2162. return this._height;
  2163. },
  2164. getSize: function () {
  2165. return {
  2166. width: this._width,
  2167. height: this._height
  2168. }
  2169. },
  2170. setWidth: function (width) {
  2171. if (width === undefined || width === null || width != width) {
  2172. return ;
  2173. }
  2174. var originWidth = this._width;
  2175. var ratio = width / originWidth;
  2176. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), w, cw, ox, rotation = this.getRotation();
  2177. for (var i = 0, len = childNodes.length; i < len; i++) {
  2178. childNode = childNodes[i];
  2179. p = childNode.getPosition();
  2180. cw = childNode.getWidth();
  2181. w = cw >=2 ? cw * ratio : cw;
  2182. childNode.setWidth(w);
  2183. ox = op.x + (p.x - op.x) * ratio;
  2184. childNode.setPosition(ox, p.y);
  2185. rotation = GD.calcRotation(rotation);
  2186. if (rotation === 0 || rotation === Math.PI) {
  2187. // 图元未旋转
  2188. ox = op.x + (p.x - op.x)*ratio;
  2189. childNode.setPosition(ox, p.y);
  2190. } else if (rotation === 90 * Math.PI / 180) {
  2191. // 图元旋转以后
  2192. ox = op.y + (p.y - op.y)*ratio;
  2193. childNode.setPosition(p.x, ox);
  2194. }
  2195. }
  2196. this._width = width;
  2197. this._originWidth = width;
  2198. this._ratioX = ratio;
  2199. return this;
  2200. },
  2201. setHeight: function (height) {
  2202. if (height === undefined || height === null || height != height) {
  2203. return ;
  2204. }
  2205. var originHeight = this._height;
  2206. var ratio = height / originHeight;
  2207. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), h, ch, oy, rotation = this.getRotation();
  2208. for (var i = 0, len = childNodes.length; i < len; i++) {
  2209. childNode = childNodes[i];
  2210. p = childNode.getPosition();
  2211. ch = childNode.getHeight();
  2212. h = ch >=2 ? ch * ratio : ch;
  2213. childNode.setHeight(h);
  2214. rotation = GD.calcRotation(rotation);
  2215. if (rotation === 0 || rotation === Math.PI) {
  2216. // 图元未旋转
  2217. oy = op.y + (p.y - op.y)*ratio;
  2218. childNode.setPosition(p.x, oy);
  2219. } else if (rotation === 90 * Math.PI / 180) {
  2220. // 图元旋转以后
  2221. oy = op.x + (p.x - op.x)*ratio;
  2222. childNode.setPosition(oy, p.y);
  2223. }
  2224. }
  2225. this._height = height;
  2226. this._originHeight = height;
  2227. this._ratioY = ratio;
  2228. return this;
  2229. },
  2230. setSize: function (size) {
  2231. // var args = Array.prototype.slice.call(arguments, 0);
  2232. // var height, width;
  2233. // if (args.length === 0) {
  2234. // return ;
  2235. // }else if (args.length === 1) {
  2236. // height = args[0].height;
  2237. // width = args[0].width;
  2238. // } else {
  2239. // width = args[0];
  2240. // height = args[1];
  2241. // }
  2242. // var wh = GD.getRatioWithRotation(angle, wid)
  2243. // this.setHeight(height);
  2244. // this.setWidth(width);
  2245. // return this;
  2246. var args = Array.prototype.slice.call(arguments, 0);
  2247. var height, width;
  2248. if (args.length === 0) {
  2249. return ;
  2250. }else if (args.length === 1) {
  2251. height = args[0].height;
  2252. width = args[0].width;
  2253. angle = 0;
  2254. } else if (args.length === 2) {
  2255. if (typeof args[0] === 'object') {
  2256. width = args[0].width;
  2257. height = args[0].height;
  2258. angle = args[1] || 0;
  2259. } else {
  2260. width = args[0];
  2261. height = args[1];
  2262. angle = 0;
  2263. }
  2264. } else if (args.length === 3) {
  2265. width = args[0];
  2266. height = args[1];
  2267. angle = args[2] || 0;
  2268. }
  2269. var wh = GD.getRatioWithRotation(0, width, height);
  2270. this.setHeight(wh.ratioY);
  2271. this.setWidth(wh.ratioX);
  2272. return this;
  2273. },
  2274. getPosition: function () {
  2275. return {
  2276. x: this._x,
  2277. y: this._y
  2278. }
  2279. },
  2280. setPosition: function () {
  2281. var args = Array.prototype.slice.call(arguments, 0), x, y;
  2282. if (args.length === 0) {
  2283. return this;
  2284. } else if (args.length === 1) {
  2285. if (typeof args[0] != 'object') {
  2286. return this;
  2287. }
  2288. x = args[0].x;
  2289. y = args[0].y;
  2290. } else {
  2291. x = args[0];
  2292. y = args[1];
  2293. }
  2294. if ((x !== 0 && !x) || (y !== 0 && !y)) {
  2295. return this;
  2296. }
  2297. // var childNodes = this.childNodes, offset, childNode, p;
  2298. // for (var i = 0, len = childNodes.length; i < len; i++) {
  2299. // childNode = childNodes[i];
  2300. // p = childNode.getPosition();
  2301. // childNode.setPosition(x - (this._x-p.x)*this._ratioX, y - (this._y-p.y)*this._ratioY);
  2302. // }
  2303. // this._x = x;
  2304. // this._y = y;
  2305. // return this;
  2306. var childNodes, childNode, background, offset = {}, op, cp;
  2307. childNodes = this.childNodes;
  2308. background = this._background;
  2309. op = background.getPosition();
  2310. offset.x = x - op.x;
  2311. offset.y = y - op.y;
  2312. for (var i = 0, len = childNodes.length; i < len; i++) {
  2313. childNode = childNodes[i];
  2314. cp = childNode.getPosition();
  2315. childNode.setPosition(cp.x + offset.x, cp.y + offset.y);
  2316. }
  2317. this._x = x;
  2318. this._y = y;
  2319. this._position = {x: x, y: y};
  2320. return this;
  2321. },
  2322. getStyle: function (key) {
  2323. if (!key) {
  2324. return undefined;
  2325. }
  2326. return this._styleObject[key];
  2327. },
  2328. setStyle: function (key, value, force) {
  2329. var childNodes = this.childNodes, childNode;
  2330. for (var i = 0, len = childNodes.length; i < len; i++) {
  2331. childNode = childNodes[i];
  2332. if (key === '2d.visible') {
  2333. if (value === graphView.isVisible(childNode)) {
  2334. continue;
  2335. }
  2336. if (!value) {
  2337. childNode._savedIsVisible = graphView.isVisible(childNode);
  2338. childNode.s({
  2339. '2d.visible': false
  2340. })
  2341. } else {
  2342. childNode.s({
  2343. '2d.visible': childNode._savedIsVisible
  2344. })
  2345. }
  2346. continue;
  2347. }
  2348. childNode.s({
  2349. key: value
  2350. });
  2351. }
  2352. this._styleObject[key] = value;
  2353. return this;
  2354. },
  2355. calcSize: function () {
  2356. var background = this._background;
  2357. var position = background.getPosition(),
  2358. width = background.getWidth(),
  2359. height = background.getHeight();
  2360. this._width = width;
  2361. this._height = height;
  2362. this._x = position.x;
  2363. this._y = position.y;
  2364. this._position = {
  2365. x: this._x,
  2366. y: this._y
  2367. }
  2368. return this;
  2369. return this;
  2370. },
  2371. s: function (styleObj, force) {
  2372. var args = Array.prototype.slice.call(arguments, 0);
  2373. var styleObj;
  2374. if (args.length === 0) {
  2375. return this;
  2376. } else if (args.length === 1) {
  2377. styleObj = args[0];
  2378. } else {
  2379. this.setStyle(args[0], args[1]);
  2380. return this;
  2381. }
  2382. for (var key in styleObj) {
  2383. if (!styleObj.hasOwnProperty(key)) {
  2384. continue;
  2385. }
  2386. this.setStyle(key, styleObj[key], force);
  2387. }
  2388. return this;
  2389. },
  2390. init: function (x, y, width, height, angle) {
  2391. var that = this;
  2392. this.calcSize();
  2393. (function (width, height, angle) {
  2394. // that.setSize(width, height, angle);
  2395. // var wh = GD.getRatioWithRotation(angle, width, height);
  2396. // width = wh.ratioX;
  2397. // height = wh.ratioY;
  2398. var originHeight = that._height;
  2399. var originWidth = that._width;
  2400. var ratioY = height / originHeight;
  2401. var ratioX = width / originWidth;
  2402. var childNodes = that.childNodes,
  2403. childNode,p, op = that.getPosition(), h, ch, oy, w, cw, ox, name, borderRatio, borderWidth;
  2404. for (var i = 0, len = childNodes.length; i < len; i++) {
  2405. childNode = childNodes[i];
  2406. p = childNode.getPosition();
  2407. childNode.originHeight = childNode.originHeight || childNode.getHeight();
  2408. ch = childNode.getHeight();
  2409. cw = childNode.getWidth();
  2410. if (ch > 2) {
  2411. h = ch * ratioY;
  2412. childNode.setHeight(h);
  2413. }
  2414. if (cw > 2) {
  2415. w = cw * ratioX;
  2416. childNode.setWidth(w);
  2417. }
  2418. borderRatio = (ratioX + ratioY)*0.5;
  2419. if (childNode._nodeType === 'line') { // 如果是线,
  2420. if (childNode.getWidth() > childNode.getHeight()) {
  2421. borderRatio = ratioX;
  2422. } else {
  2423. borderRatio = ratioY;
  2424. }
  2425. }
  2426. name = childNode._nodename;
  2427. // if (childNode.borderWidth && name && ch > 2 && cw > 2) {
  2428. // borderWidth = childNode.borderWidth / borderRatio;
  2429. // if (borderWidth > ch*0.5 || borderWidth > cw *0.5) {
  2430. // // borderWidth = childNode.borderWidth;
  2431. // }
  2432. // childNode.borderWidth = borderWidth;
  2433. // childNode.a(name + '.borderwidth', borderWidth);
  2434. // }
  2435. }
  2436. that._height = height;
  2437. that._originHeight = height;
  2438. that._ratioY = ratioY;
  2439. that._width = width;
  2440. that._originWidth = width;
  2441. that._ratioX = ratioX;
  2442. })(width, height, angle);
  2443. that._x = width / 2;
  2444. that._y = height / 2;
  2445. that._rotation = 0;
  2446. // that.setPosition(x, y);
  2447. (function (x, y) {
  2448. var childNodes = that.childNodes, offset, childNode;
  2449. var w2 = that.getWidth() / 2, h2 = that.getHeight()/2;
  2450. for (var i = 0, len = childNodes.length; i < len; i++) {
  2451. childNode = childNodes[i];
  2452. offset = childNode.getPosition();
  2453. childNode.setPosition(x + offset.x * that._ratioX - w2, y + offset.y * that._ratioY - h2);
  2454. }
  2455. that._x = x;
  2456. that._y = y;
  2457. })(x, y);
  2458. // setTimeout(that.addEVent, 1000);
  2459. },
  2460. setRotation: function (angle) {
  2461. var that = this, _angle = that.getRotation();
  2462. if (angle!==0 && !angle || angle === _angle) {
  2463. return this;
  2464. }
  2465. var childNodes = this.childNodes, childNode, p = this.getPosition(), px = p.x, py = p.y;
  2466. for (var i = 0, len = childNodes.length; i < len; i++) {
  2467. childNode = childNodes[i];
  2468. var x = childNode.getPosition().x - px;
  2469. var y = childNode.getPosition().y - py;
  2470. childNode.setPosition(Math.cos(angle-_angle) * x - Math.sin(angle-_angle) * y + px, Math.cos(angle-_angle) * y + Math.sin(angle-_angle) * x + py);
  2471. childNode.setRotation(angle);
  2472. }
  2473. this._rotation = angle;
  2474. return this;
  2475. },
  2476. getRotation: function () {
  2477. return this._rotation;
  2478. },
  2479. setScale: function (sx, sy) {
  2480. var that = this,
  2481. childNodes = this.childNodes,
  2482. childNode;
  2483. if (sx === undefined || sx === null) return ;
  2484. if (sy === undefined || sy === null) {
  2485. sy = sx;
  2486. }
  2487. for (var i = 0, len = childNodes.length; i < len; i++) {
  2488. childNode = childNodes[i];
  2489. if (typeof childNode.setScale === 'function') {
  2490. childNode.setScale(sx, sy);
  2491. }
  2492. }
  2493. },
  2494. getScale: function () {
  2495. return this._background.getScale();
  2496. },
  2497. setScaleX: function (sx) {
  2498. if (sx === undefined || sx === null) return;
  2499. var that = this,
  2500. childNodes = this.childNodes,
  2501. childNode;
  2502. for (var i = 0, len = childNodes.length; i < len; i++) {
  2503. childNode = childNodes[i];
  2504. if (typeof childNode.setScaleX === 'function') {
  2505. childNode.setScaleX(sx);
  2506. }
  2507. }
  2508. },
  2509. setScaleY: function (sy) {
  2510. if (sy === undefined || sy === null) return;
  2511. var that = this,
  2512. childNodes = this.childNodes,
  2513. childNode;
  2514. for (var i = 0, len = childNodes.length; i < len; i++) {
  2515. childNode = childNodes[i];
  2516. if (typeof childNode.setScaleY === 'function') {
  2517. childNode.setScaleY(sy);
  2518. }
  2519. }
  2520. },
  2521. getScaleX: function () {
  2522. return this._background.getScaleX();
  2523. },
  2524. getScaleY: function () {
  2525. return this._background.getScaleY();
  2526. },
  2527. evert: function () {
  2528. var that = this,
  2529. childNodes = this.childNodes,
  2530. background = this._background,
  2531. bp = background.getPosition(),
  2532. bx = bp.x,
  2533. by = bp.y,
  2534. childNode, distanceX, distanceY, x, y, p, nx, ny;
  2535. for (var i = 0, len = childNodes.length; i < len; i++) {
  2536. childNode = childNodes[i];
  2537. p = childNode.getPosition();
  2538. x = p.x;
  2539. y = p.y;
  2540. distanceX = bx - x;
  2541. distanceY = by - y;
  2542. nx = bx + distanceX;
  2543. ny = by + distanceY;
  2544. childNode.setPosition(nx, ny);
  2545. if (typeof childNode.setScale === 'function') {
  2546. if (!(childNode._disallowEvert === true))
  2547. childNode.setScale(-1, -1);
  2548. }
  2549. }
  2550. },
  2551. evertX: function () {
  2552. var that = this,
  2553. childNodes = this.childNodes,
  2554. background = this._background,
  2555. bx = background.getPosition().x,
  2556. childNode, distance, x, p, nx;
  2557. for (var i = 0, len = childNodes.length; i < len; i++) {
  2558. childNode = childNodes[i];
  2559. p = childNode.getPosition();
  2560. x = p.x;
  2561. distance = bx - x;
  2562. nx = bx + distance;
  2563. childNode.setPosition(nx, p.y);
  2564. if (typeof childNode.setScaleX === 'function') {
  2565. if (!(childNode._disallowEvert === true))
  2566. childNode.setScaleX(-1);
  2567. }
  2568. }
  2569. },
  2570. evertY: function () {
  2571. var that = this,
  2572. childNodes = this.childNodes,
  2573. background = this._background,
  2574. by = background.getPosition().y,
  2575. childNode, distance, y, p, ny;
  2576. for (var i = 0, len = childNodes.length; i < len; i++) {
  2577. childNode = childNodes[i];
  2578. p = childNode.getPosition();
  2579. y = p.y;
  2580. distance = by - y;
  2581. ny = by + distance;
  2582. childNode.setPosition(p.x, ny);
  2583. if (typeof childNode.setScaleY === 'function') {
  2584. if (!(childNode._disallowEvert === true))
  2585. childNode.setScaleY(-1);
  2586. }
  2587. }
  2588. },
  2589. attr: function (key, value) {
  2590. var _attrObj = this._attrObj || {};
  2591. if (arguments.length === 1) {
  2592. return _attrObj[key];
  2593. }
  2594. var childNodes = this.childNodes, childNode;
  2595. _attrObj[key] = value;
  2596. for (var i = 0; childNode = childNodes[i++];) {
  2597. if (typeof childNode.a === 'function') {
  2598. childNode.a(key, value);
  2599. }
  2600. }
  2601. },
  2602. a: function () {
  2603. return this.attr.apply(this, arguments);
  2604. }
  2605. });
  2606. }