12345.js 116 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868
  1. ht.lib = ht.lib || {};
  2. if (!ht.lib['12345']) {
  3. ht.lib['12345'] = function (x, y, width, height, angle, localVarObj, localDynamicVar, nodename) {
  4. _ratio = GD.getRatioWithRotation(0, ratio);
  5. ht.lib['12345'].superClass.constructor.apply(this);
  6. this.localVarObj = localVarObj;
  7. this.localDynamicVar = localDynamicVar;
  8. this.childNodes = [];
  9. this._styleObject = {};
  10. this._originWidth = 87*_ratio.ratioX;
  11. this._originHeight = 59*_ratio.ratioY;
  12. this._baseClass = "ht.lib.12345";
  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_12345Node0points=[27, 48,27, 58],
  36. Lib_12345Node0rect=ht.Default.unionPoint([{x:27,y:48},{x:27,y:58}]),
  37. Lib_12345Node0compspts=[];
  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_12345Node0points.length;i++){
  42. if(i%2==0){
  43. Lib_12345Node0compspts.push(Lib_12345Node0points[i]-Lib_12345Node0rect.x);
  44. }else{
  45. Lib_12345Node0compspts.push(Lib_12345Node0points[i]-Lib_12345Node0rect.y);
  46. }
  47. }
  48. var Lib_12345Node0ptslength=Lib_12345Node0compspts.length;
  49. if (Lib_12345Node0rect.height === 0) {
  50. Lib_12345Node0compspts[0] -= 0;
  51. Lib_12345Node0compspts[Lib_12345Node0ptslength-2] += 0;
  52. } else if (Lib_12345Node0rect.width === 0){
  53. Lib_12345Node0compspts[1] -= 0;
  54. Lib_12345Node0compspts[Lib_12345Node0ptslength-1] += 0;
  55. } else {
  56. Lib_12345Node0compspts[0] -= 0;
  57. Lib_12345Node0compspts[1] -= 0;
  58. Lib_12345Node0compspts[Lib_12345Node0ptslength-2] += 0;
  59. Lib_12345Node0compspts[Lib_12345Node0ptslength-1] += 0;
  60. }
  61. Lib_12345Node0 = new ht.Node();
  62. Lib_12345Node0.borderWidth = 1;
  63. Lib_12345Node0rect.width = Lib_12345Node0rect.width === 0 ? 0.0001 : Lib_12345Node0rect.width;
  64. Lib_12345Node0rect.height = Lib_12345Node0rect.height === 0 ? 0.0001 : Lib_12345Node0rect.height;
  65. var Lib_12345Node0endCompspts = [Lib_12345Node0compspts[Lib_12345Node0ptslength-2],Lib_12345Node0compspts[Lib_12345Node0ptslength-1],0,0];
  66. var Lib_12345Node0startCompspts = [Lib_12345Node0compspts[0],Lib_12345Node0compspts[1],0,0];
  67. Lib_12345Node0.setImage(GD.getPolyLineJSON());
  68. Lib_12345Node0.setPosition(Lib_12345Node0rect.x+Lib_12345Node0rect.width/2,Lib_12345Node0rect.y+Lib_12345Node0rect.height/2);
  69. Lib_12345Node0.setSize(Lib_12345Node0rect.width,Lib_12345Node0rect.height);
  70. Lib_12345Node0.setStyle("opacity",1);
  71. Lib_12345Node0.s({'pixelPerfect':true});
  72. Lib_12345Node0borderwidth=1;
  73. Lib_12345Node0.setRotation(0);
  74. dataModel.add(Lib_12345Node0);
  75. Lib_12345Node0.a('node.points',Lib_12345Node0compspts);
  76. Lib_12345Node0.a('node.segments',[1,2]);
  77. Lib_12345Node0.a('node.color','rgba(255,128,0,1)');
  78. Lib_12345Node0.a('node.borderPattern',getDashStyle("@borderPattern@"));
  79. Lib_12345Node0.a('node.borderColor','rgba(255,128,0,1)');
  80. Lib_12345Node0.a('node.background','rgba(255,128,0,1)');
  81. Lib_12345Node0.a('node.gradient','');
  82. Lib_12345Node0.a('node.gradientcolor','rgba(255,128,0,1)');
  83. Lib_12345Node0.a('node.endCompspts',Lib_12345Node0endCompspts);
  84. Lib_12345Node0.a('node.startCompspts',Lib_12345Node0startCompspts);
  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_12345Node0';
  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_12345Node0, Lib_12345Node0.getImage(), Lib_12345Node0compspts, Lib_12345Node0endCompspts, Lib_12345Node0startCompspts);
  143. var Lib_12345Node1points=[27, 58,77, 58],
  144. Lib_12345Node1rect=ht.Default.unionPoint([{x:27,y:58},{x:77,y:58}]),
  145. Lib_12345Node1compspts=[];
  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_12345Node1points.length;i++){
  150. if(i%2==0){
  151. Lib_12345Node1compspts.push(Lib_12345Node1points[i]-Lib_12345Node1rect.x);
  152. }else{
  153. Lib_12345Node1compspts.push(Lib_12345Node1points[i]-Lib_12345Node1rect.y);
  154. }
  155. }
  156. var Lib_12345Node1ptslength=Lib_12345Node1compspts.length;
  157. if (Lib_12345Node1rect.height === 0) {
  158. Lib_12345Node1compspts[0] -= 0;
  159. Lib_12345Node1compspts[Lib_12345Node1ptslength-2] += 0;
  160. } else if (Lib_12345Node1rect.width === 0){
  161. Lib_12345Node1compspts[1] -= 0;
  162. Lib_12345Node1compspts[Lib_12345Node1ptslength-1] += 0;
  163. } else {
  164. Lib_12345Node1compspts[0] -= 0;
  165. Lib_12345Node1compspts[1] -= 0;
  166. Lib_12345Node1compspts[Lib_12345Node1ptslength-2] += 0;
  167. Lib_12345Node1compspts[Lib_12345Node1ptslength-1] += 0;
  168. }
  169. Lib_12345Node1 = new ht.Node();
  170. Lib_12345Node1.borderWidth = 1;
  171. Lib_12345Node1rect.width = Lib_12345Node1rect.width === 0 ? 0.0001 : Lib_12345Node1rect.width;
  172. Lib_12345Node1rect.height = Lib_12345Node1rect.height === 0 ? 0.0001 : Lib_12345Node1rect.height;
  173. var Lib_12345Node1endCompspts = [Lib_12345Node1compspts[Lib_12345Node1ptslength-2],Lib_12345Node1compspts[Lib_12345Node1ptslength-1],0,0];
  174. var Lib_12345Node1startCompspts = [Lib_12345Node1compspts[0],Lib_12345Node1compspts[1],0,0];
  175. Lib_12345Node1.setImage(GD.getPolyLineJSON());
  176. Lib_12345Node1.setPosition(Lib_12345Node1rect.x+Lib_12345Node1rect.width/2,Lib_12345Node1rect.y+Lib_12345Node1rect.height/2);
  177. Lib_12345Node1.setSize(Lib_12345Node1rect.width,Lib_12345Node1rect.height);
  178. Lib_12345Node1.setStyle("opacity",1);
  179. Lib_12345Node1.s({'pixelPerfect':true});
  180. Lib_12345Node1borderwidth=1;
  181. Lib_12345Node1.setRotation(0);
  182. dataModel.add(Lib_12345Node1);
  183. Lib_12345Node1.a('node.points',Lib_12345Node1compspts);
  184. Lib_12345Node1.a('node.segments',[1,2]);
  185. Lib_12345Node1.a('node.color','rgba(255,128,0,1)');
  186. Lib_12345Node1.a('node.borderPattern',getDashStyle("@borderPattern@"));
  187. Lib_12345Node1.a('node.borderColor','rgba(255,128,0,1)');
  188. Lib_12345Node1.a('node.background','rgba(255,128,0,1)');
  189. Lib_12345Node1.a('node.gradient','');
  190. Lib_12345Node1.a('node.gradientcolor','rgba(255,128,0,1)');
  191. Lib_12345Node1.a('node.endCompspts',Lib_12345Node1endCompspts);
  192. Lib_12345Node1.a('node.startCompspts',Lib_12345Node1startCompspts);
  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_12345Node1';
  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_12345Node1, Lib_12345Node1.getImage(), Lib_12345Node1compspts, Lib_12345Node1endCompspts, Lib_12345Node1startCompspts);
  251. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  252. var Lib_12345Node2type = 'oval';
  253. var Lib_12345Node2 = new ht.Node(),
  254. Lib_12345Node2BorderWidth = 1*2;
  255. if (Lib_12345Node2type === 'arc') {
  256. Lib_12345Node2BorderWidth *= 1;
  257. }
  258. Lib_12345Node2.setImage(GD.getRectJSON(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY, Lib_12345Node2type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  259. Lib_12345Node2.setPosition(30*ratio.ratioX, 20*ratio.ratioY);
  260. Lib_12345Node2.setSize(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY);
  261. Lib_12345Node2.s({
  262. 'pixelPerfect':true
  263. /*@AddPara@*/
  264. });
  265. Lib_12345Node2.a('node.width', 24.12698*_ratio.ratioX);
  266. Lib_12345Node2.a('node.height', 20.63269*_ratio.ratioY);
  267. Lib_12345Node2.a('node.type', Lib_12345Node2type);
  268. Lib_12345Node2.a('node.rect', [0, 0, 24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY]);
  269. Lib_12345Node2.a('node.background', 'rgba(255,255,255,0.003921569)');
  270. Lib_12345Node2.a('node.gradientcolor', '');
  271. Lib_12345Node2.a('node.gradient', '');
  272. Lib_12345Node2.a('node.borderwidth', Lib_12345Node2BorderWidth);
  273. Lib_12345Node2.a('node.color', 'rgba(255,128,0,1)');
  274. Lib_12345Node2.a('node.fillrect', [0,0,0,0]);
  275. Lib_12345Node2.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  276. Lib_12345Node2.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  277. Lib_12345Node2.a('node.fillgradient', '');
  278. if (Lib_12345Node2type !== 'rect') {
  279. Lib_12345Node2.a('node.arcFrom', parseFloat('@arcFrom@'));
  280. Lib_12345Node2.a('node.arcTo', parseFloat('@arcTo@'));
  281. Lib_12345Node2.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  282. }
  283. if (Lib_12345Node2type === 'arc') {
  284. Lib_12345Node2.a('node.arcOval', true);
  285. }
  286. Lib_12345Node2.setRotation(0*Math.PI/180);
  287. Lib_12345Node2.borderWidth = Lib_12345Node2BorderWidth;
  288. Lib_12345Node2.borderFillwidth = Lib_12345Node2BorderWidth;
  289. dataModel.add(Lib_12345Node2);
  290. Lib_12345Node2._nodename = 'Lib_12345Node2'
  291. Lib_12345Node2._nodeType = 'rect';
  292. zoomNodeList.push({
  293. node: Lib_12345Node2,
  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_12345Node2, Lib_12345Node2.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  314. var Lib_12345Node3type = 'oval';
  315. var Lib_12345Node3 = new ht.Node(),
  316. Lib_12345Node3BorderWidth = 1*2;
  317. if (Lib_12345Node3type === 'arc') {
  318. Lib_12345Node3BorderWidth *= 1;
  319. }
  320. Lib_12345Node3.setImage(GD.getRectJSON(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY, Lib_12345Node3type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  321. Lib_12345Node3.setPosition(12*ratio.ratioX, 28*ratio.ratioY);
  322. Lib_12345Node3.setSize(24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY);
  323. Lib_12345Node3.s({
  324. 'pixelPerfect':true
  325. /*@AddPara@*/
  326. });
  327. Lib_12345Node3.a('node.width', 24.12698*_ratio.ratioX);
  328. Lib_12345Node3.a('node.height', 20.63269*_ratio.ratioY);
  329. Lib_12345Node3.a('node.type', Lib_12345Node3type);
  330. Lib_12345Node3.a('node.rect', [0, 0, 24.12698*_ratio.ratioX, 20.63269*_ratio.ratioY]);
  331. Lib_12345Node3.a('node.background', 'rgba(255,255,255,0.003921569)');
  332. Lib_12345Node3.a('node.gradientcolor', '');
  333. Lib_12345Node3.a('node.gradient', '');
  334. Lib_12345Node3.a('node.borderwidth', Lib_12345Node3BorderWidth);
  335. Lib_12345Node3.a('node.color', 'rgba(255,128,0,1)');
  336. Lib_12345Node3.a('node.fillrect', [0,0,0,0]);
  337. Lib_12345Node3.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  338. Lib_12345Node3.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  339. Lib_12345Node3.a('node.fillgradient', '');
  340. if (Lib_12345Node3type !== 'rect') {
  341. Lib_12345Node3.a('node.arcFrom', parseFloat('@arcFrom@'));
  342. Lib_12345Node3.a('node.arcTo', parseFloat('@arcTo@'));
  343. Lib_12345Node3.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  344. }
  345. if (Lib_12345Node3type === 'arc') {
  346. Lib_12345Node3.a('node.arcOval', true);
  347. }
  348. Lib_12345Node3.setRotation(0*Math.PI/180);
  349. Lib_12345Node3.borderWidth = Lib_12345Node3BorderWidth;
  350. Lib_12345Node3.borderFillwidth = Lib_12345Node3BorderWidth;
  351. dataModel.add(Lib_12345Node3);
  352. Lib_12345Node3._nodename = 'Lib_12345Node3'
  353. Lib_12345Node3._nodeType = 'rect';
  354. zoomNodeList.push({
  355. node: Lib_12345Node3,
  356. attr: 'node.borderwidth'
  357. });
  358. (function (node, _img) {
  359. var setWidth = node.setWidth,
  360. setHeight = node.setHeight;
  361. node.setWidth = function (width) {
  362. if (width === this.getWidth()) return ;
  363. var height = this.getHeight();
  364. this.a('node.width', width);
  365. this.a('node.rect', [0,0,width, height]);
  366. setWidth.apply(this, arguments);
  367. }
  368. node.setHeight = function (height) {
  369. if (height === this.getHeight()) return ;
  370. var width = this.getWidth();
  371. this.a('node.height', height);
  372. this.a('node.rect', [0,0,width, height]);
  373. setHeight.apply(this, arguments);
  374. }
  375. })(Lib_12345Node3, Lib_12345Node3.getImage());var Lib_12345Node4rect=ht.Default.unionPoint([{x: 5, y: 23},{x: 5, y: 23},{x: 14, y: 23},{x: 10, y: 33}]),
  376. Lib_12345Node4points=[5,23,5,23,14,23,10,33],
  377. Lib_12345Node4compsPoints=[],
  378. Lib_12345Node4SetPoints = [{x: 5, y: 23},{x: 5, y: 23},{x: 14, y: 23},{x: 10, y: 33}],
  379. Lib_12345Node4setSegments = [1,2,2,2];
  380. _ratio = GD.getRatioWithRotation(1.570796, ratio);
  381. for(var i=0;i<Lib_12345Node4points.length;i++){
  382. if(i%2==0){
  383. Lib_12345Node4compsPoints.push(Lib_12345Node4points[i]-Lib_12345Node4rect.x);
  384. }else{
  385. Lib_12345Node4compsPoints.push(Lib_12345Node4points[i]-Lib_12345Node4rect.y);
  386. }
  387. }
  388. var Lib_12345Node4 = new ht.Node();
  389. Lib_12345Node4.setImage(GD.getPolyGonJSON());
  390. Lib_12345Node4.setPosition(Lib_12345Node4rect.x + Lib_12345Node4rect.width/2, Lib_12345Node4rect.y + Lib_12345Node4rect.height/2);
  391. Lib_12345Node4.setSize(Lib_12345Node4rect.width, Lib_12345Node4rect.height);
  392. Lib_12345Node4.setRotation(1.570796);
  393. Lib_12345Node4.borderWidth=1;
  394. Lib_12345Node4.borderFillwidth=1*2;
  395. Lib_12345Node4.s({'pixelPerfect':true});
  396. dataModel.add(Lib_12345Node4);
  397. // Lib_12345Node4.a('node.width', Lib_12345Node4rect.width*_ratio.ratioX);
  398. // Lib_12345Node4.a('node.height', Lib_12345Node4rect.height*_ratio.ratioY);
  399. Lib_12345Node4.a('node.clip', function(g,width,height,data) {
  400. var clippoints = Lib_12345Node4SetPoints;
  401. if(clippoints.length<=3) return;
  402. if(Lib_12345Node4.a('Lib_12345Node4.isFill')=="false") return;
  403. var clipcompsPoints=[];
  404. var rect = ht.Default.unionPoint(clippoints);
  405. for(var i=0;i<clippoints.length;i++){
  406. clipcompsPoints.push({x:clippoints[i].x-rect.x,y:clippoints[i].y-rect.y});
  407. }
  408. var clipsegments=Lib_12345Node4setSegments;
  409. g.beginPath();
  410. drawPoints(g,clipcompsPoints,clipsegments);
  411. g.clip();
  412. })
  413. Lib_12345Node4.a('node.type', 'shape');
  414. Lib_12345Node4.a('node.comsPoints', Lib_12345Node4compsPoints);
  415. Lib_12345Node4.a('node.closePath', true);
  416. Lib_12345Node4.a('node.borderwidth', 1);
  417. Lib_12345Node4.a('node.color', 'rgba(255,128,0,1)');
  418. Lib_12345Node4.a('node.background','rgba(255,255,255,0.003921569)');
  419. Lib_12345Node4.a('node.closePath', true);
  420. Lib_12345Node4.a('node.closePath', true);
  421. Lib_12345Node4.a('node.gradient','');
  422. Lib_12345Node4.a('node.gradientcolor','');
  423. Lib_12345Node4.a('node.isFill','false');
  424. Lib_12345Node4.a('node.original',[0,0,0,0]);
  425. Lib_12345Node4.a('node.fillrect',[0,0,0,0]);
  426. Lib_12345Node4.a('node.fillbackcolor','rgba(255,255,255,0.003921569)');
  427. Lib_12345Node4.a('node.fillgradient','');
  428. Lib_12345Node4.a('node.fillgradientcolor','');
  429. Lib_12345Node4.a('node.segments',Lib_12345Node4setSegments);
  430. Lib_12345Node4.a('node.borderPattern',"");
  431. (function (node, nodecompsPoints, setPoints) {
  432. var w = node.getWidth()*_ratio.ratioX,
  433. h = node.getHeight()*_ratio.ratioY,
  434. img = node.getImage();
  435. function resetPoints(rx, ry) {
  436. for (var i = 0, len = nodecompsPoints.length; i < len; i++) {
  437. if (i%2 === 0) {
  438. nodecompsPoints[i]*=rx;
  439. } else {
  440. nodecompsPoints[i]*=ry;
  441. }
  442. if (setPoints[i]) {
  443. setPoints[i].x *= rx;
  444. setPoints[i].y *= ry;
  445. }
  446. }
  447. }
  448. node.setSize(w, h);
  449. node.a('node.width', w);
  450. node.a('node.height', h);
  451. resetPoints(_ratio.ratioX, _ratio.ratioY);
  452. var position = node.getPosition();
  453. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  454. node._nodename = 'Lib_12345Node4';
  455. node._nodeType = 'polygon';
  456. zoomNodeList.push({
  457. node: node,
  458. attr: 'node.borderwidth'
  459. });
  460. // 重载setWidth, setHeight
  461. var setWidth = node.setWidth,
  462. setHeight = node.setHeight,
  463. timer, rx = 1, ry = 1;
  464. node.setWidth = function (width) {
  465. var _width = this.getWidth();
  466. rx = width / _width;
  467. node.a('node.width', width);
  468. setWidth.apply(this, arguments);
  469. resetPoints(rx, 1);
  470. }
  471. node.setHeight = function (height) {
  472. var _height = this.getHeight();
  473. ry = height / _height;
  474. node.a('node.height', height);
  475. setHeight.apply(this, arguments);
  476. resetPoints(1, ry);
  477. }
  478. })(Lib_12345Node4, Lib_12345Node4compsPoints, Lib_12345Node4SetPoints );
  479. var Lib_12345Node5points=[30, 14,30, 20],
  480. Lib_12345Node5rect=ht.Default.unionPoint([{x:30,y:14},{x:30,y:20}]),
  481. Lib_12345Node5compspts=[];
  482. _ratio = GD.getRatioWithRotation(0, ratio);
  483. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  484. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  485. for(var i=0;i<Lib_12345Node5points.length;i++){
  486. if(i%2==0){
  487. Lib_12345Node5compspts.push(Lib_12345Node5points[i]-Lib_12345Node5rect.x);
  488. }else{
  489. Lib_12345Node5compspts.push(Lib_12345Node5points[i]-Lib_12345Node5rect.y);
  490. }
  491. }
  492. var Lib_12345Node5ptslength=Lib_12345Node5compspts.length;
  493. if (Lib_12345Node5rect.height === 0) {
  494. Lib_12345Node5compspts[0] -= 0;
  495. Lib_12345Node5compspts[Lib_12345Node5ptslength-2] += 0;
  496. } else if (Lib_12345Node5rect.width === 0){
  497. Lib_12345Node5compspts[1] -= 0;
  498. Lib_12345Node5compspts[Lib_12345Node5ptslength-1] += 0;
  499. } else {
  500. Lib_12345Node5compspts[0] -= 0;
  501. Lib_12345Node5compspts[1] -= 0;
  502. Lib_12345Node5compspts[Lib_12345Node5ptslength-2] += 0;
  503. Lib_12345Node5compspts[Lib_12345Node5ptslength-1] += 0;
  504. }
  505. Lib_12345Node5 = new ht.Node();
  506. Lib_12345Node5.borderWidth = 1;
  507. Lib_12345Node5rect.width = Lib_12345Node5rect.width === 0 ? 0.0001 : Lib_12345Node5rect.width;
  508. Lib_12345Node5rect.height = Lib_12345Node5rect.height === 0 ? 0.0001 : Lib_12345Node5rect.height;
  509. var Lib_12345Node5endCompspts = [Lib_12345Node5compspts[Lib_12345Node5ptslength-2],Lib_12345Node5compspts[Lib_12345Node5ptslength-1],0,0];
  510. var Lib_12345Node5startCompspts = [Lib_12345Node5compspts[0],Lib_12345Node5compspts[1],0,0];
  511. Lib_12345Node5.setImage(GD.getPolyLineJSON());
  512. Lib_12345Node5.setPosition(Lib_12345Node5rect.x+Lib_12345Node5rect.width/2,Lib_12345Node5rect.y+Lib_12345Node5rect.height/2);
  513. Lib_12345Node5.setSize(Lib_12345Node5rect.width,Lib_12345Node5rect.height);
  514. Lib_12345Node5.setStyle("opacity",1);
  515. Lib_12345Node5.s({'pixelPerfect':true});
  516. Lib_12345Node5borderwidth=1;
  517. Lib_12345Node5.setRotation(0);
  518. dataModel.add(Lib_12345Node5);
  519. Lib_12345Node5.a('node.points',Lib_12345Node5compspts);
  520. Lib_12345Node5.a('node.segments',[1,2]);
  521. Lib_12345Node5.a('node.color','rgba(255,128,0,1)');
  522. Lib_12345Node5.a('node.borderPattern',getDashStyle("@borderPattern@"));
  523. Lib_12345Node5.a('node.borderColor','rgba(255,128,0,1)');
  524. Lib_12345Node5.a('node.background','rgba(255,128,0,1)');
  525. Lib_12345Node5.a('node.gradient','');
  526. Lib_12345Node5.a('node.gradientcolor','rgba(255,128,0,1)');
  527. Lib_12345Node5.a('node.endCompspts',Lib_12345Node5endCompspts);
  528. Lib_12345Node5.a('node.startCompspts',Lib_12345Node5startCompspts);
  529. (function (node, img, compspts, endCompspts, startCompspts) {
  530. var position = node.getPosition(),
  531. w = node.getWidth()*_ratio.ratioX,
  532. h = node.getHeight()*_ratio.ratioY;
  533. function resetPoints(rx, ry) {
  534. for (var i = 0, len = compspts.length; i < len; i++) {
  535. if (i%2 === 0) {
  536. compspts[i]*=rx;
  537. } else {
  538. compspts[i]*=ry;
  539. }
  540. }
  541. endCompspts[0] = compspts[compspts.length-2];
  542. endCompspts[1] = compspts[compspts.length-1];
  543. endCompspts[2] *= rx;
  544. endCompspts[3] *= ry;
  545. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  546. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  547. startCompspts[0] = compspts[0];
  548. startCompspts[1] = compspts[1];
  549. startCompspts[2] *= rx;
  550. startCompspts[3] *= ry;
  551. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  552. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  553. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  554. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  555. }
  556. node.setSize(w, h);
  557. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  558. node.a('node.width', w);
  559. node.a('node.height', h);
  560. resetPoints(_ratio.ratioX, _ratio.ratioY);
  561. node.borderWidth = 1;
  562. node.a('node.borderwidth',node.borderWidth);
  563. node._nodename = 'Lib_12345Node5';
  564. node._nodeType = 'line';
  565. zoomNodeList.push({
  566. node: node,
  567. attr: 'node.borderwidth'
  568. });
  569. var setWidth = node.setWidth,
  570. setHeight = node.setHeight,
  571. timer, rx = 1, ry = 1;
  572. node.setWidth = function (width) {
  573. var _width = this.getWidth();
  574. rx = width / _width;
  575. node.a('node.width', width);
  576. setWidth.apply(this, arguments);
  577. resetPoints(rx, 1);
  578. }
  579. node.setHeight = function (height) {
  580. var _height = this.getHeight();
  581. ry = height / _height;
  582. node.a('node.height', height);
  583. setHeight.apply(this, arguments);
  584. resetPoints(1, ry);
  585. }
  586. })(Lib_12345Node5, Lib_12345Node5.getImage(), Lib_12345Node5compspts, Lib_12345Node5endCompspts, Lib_12345Node5startCompspts);
  587. var Lib_12345Node6points=[30, 20,36, 24],
  588. Lib_12345Node6rect=ht.Default.unionPoint([{x:30,y:20},{x:36,y:24}]),
  589. Lib_12345Node6compspts=[];
  590. _ratio = GD.getRatioWithRotation(0, ratio);
  591. var _startratio = GD.getRatioWithRotation(3.72959527089228, ratio),
  592. _endratio = GD.getRatioWithRotation(0.588002617302485, ratio);
  593. for(var i=0;i<Lib_12345Node6points.length;i++){
  594. if(i%2==0){
  595. Lib_12345Node6compspts.push(Lib_12345Node6points[i]-Lib_12345Node6rect.x);
  596. }else{
  597. Lib_12345Node6compspts.push(Lib_12345Node6points[i]-Lib_12345Node6rect.y);
  598. }
  599. }
  600. var Lib_12345Node6ptslength=Lib_12345Node6compspts.length;
  601. if (Lib_12345Node6rect.height === 0) {
  602. Lib_12345Node6compspts[0] -= 0;
  603. Lib_12345Node6compspts[Lib_12345Node6ptslength-2] += 0;
  604. } else if (Lib_12345Node6rect.width === 0){
  605. Lib_12345Node6compspts[1] -= 0;
  606. Lib_12345Node6compspts[Lib_12345Node6ptslength-1] += 0;
  607. } else {
  608. Lib_12345Node6compspts[0] -= 0;
  609. Lib_12345Node6compspts[1] -= 0;
  610. Lib_12345Node6compspts[Lib_12345Node6ptslength-2] += 0;
  611. Lib_12345Node6compspts[Lib_12345Node6ptslength-1] += 0;
  612. }
  613. Lib_12345Node6 = new ht.Node();
  614. Lib_12345Node6.borderWidth = 1;
  615. Lib_12345Node6rect.width = Lib_12345Node6rect.width === 0 ? 0.0001 : Lib_12345Node6rect.width;
  616. Lib_12345Node6rect.height = Lib_12345Node6rect.height === 0 ? 0.0001 : Lib_12345Node6rect.height;
  617. var Lib_12345Node6endCompspts = [Lib_12345Node6compspts[Lib_12345Node6ptslength-2],Lib_12345Node6compspts[Lib_12345Node6ptslength-1],0,0];
  618. var Lib_12345Node6startCompspts = [Lib_12345Node6compspts[0],Lib_12345Node6compspts[1],0,0];
  619. Lib_12345Node6.setImage(GD.getPolyLineJSON());
  620. Lib_12345Node6.setPosition(Lib_12345Node6rect.x+Lib_12345Node6rect.width/2,Lib_12345Node6rect.y+Lib_12345Node6rect.height/2);
  621. Lib_12345Node6.setSize(Lib_12345Node6rect.width,Lib_12345Node6rect.height);
  622. Lib_12345Node6.setStyle("opacity",1);
  623. Lib_12345Node6.s({'pixelPerfect':true});
  624. Lib_12345Node6borderwidth=1;
  625. Lib_12345Node6.setRotation(0);
  626. dataModel.add(Lib_12345Node6);
  627. Lib_12345Node6.a('node.points',Lib_12345Node6compspts);
  628. Lib_12345Node6.a('node.segments',[1,2]);
  629. Lib_12345Node6.a('node.color','rgba(255,128,0,1)');
  630. Lib_12345Node6.a('node.borderPattern',getDashStyle("@borderPattern@"));
  631. Lib_12345Node6.a('node.borderColor','rgba(255,128,0,1)');
  632. Lib_12345Node6.a('node.background','rgba(255,128,0,1)');
  633. Lib_12345Node6.a('node.gradient','');
  634. Lib_12345Node6.a('node.gradientcolor','rgba(255,128,0,1)');
  635. Lib_12345Node6.a('node.endCompspts',Lib_12345Node6endCompspts);
  636. Lib_12345Node6.a('node.startCompspts',Lib_12345Node6startCompspts);
  637. (function (node, img, compspts, endCompspts, startCompspts) {
  638. var position = node.getPosition(),
  639. w = node.getWidth()*_ratio.ratioX,
  640. h = node.getHeight()*_ratio.ratioY;
  641. function resetPoints(rx, ry) {
  642. for (var i = 0, len = compspts.length; i < len; i++) {
  643. if (i%2 === 0) {
  644. compspts[i]*=rx;
  645. } else {
  646. compspts[i]*=ry;
  647. }
  648. }
  649. endCompspts[0] = compspts[compspts.length-2];
  650. endCompspts[1] = compspts[compspts.length-1];
  651. endCompspts[2] *= rx;
  652. endCompspts[3] *= ry;
  653. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  654. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  655. startCompspts[0] = compspts[0];
  656. startCompspts[1] = compspts[1];
  657. startCompspts[2] *= rx;
  658. startCompspts[3] *= ry;
  659. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  660. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  661. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  662. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  663. }
  664. node.setSize(w, h);
  665. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  666. node.a('node.width', w);
  667. node.a('node.height', h);
  668. resetPoints(_ratio.ratioX, _ratio.ratioY);
  669. node.borderWidth = 1;
  670. node.a('node.borderwidth',node.borderWidth);
  671. node._nodename = 'Lib_12345Node6';
  672. node._nodeType = 'line';
  673. zoomNodeList.push({
  674. node: node,
  675. attr: 'node.borderwidth'
  676. });
  677. var setWidth = node.setWidth,
  678. setHeight = node.setHeight,
  679. timer, rx = 1, ry = 1;
  680. node.setWidth = function (width) {
  681. var _width = this.getWidth();
  682. rx = width / _width;
  683. node.a('node.width', width);
  684. setWidth.apply(this, arguments);
  685. resetPoints(rx, 1);
  686. }
  687. node.setHeight = function (height) {
  688. var _height = this.getHeight();
  689. ry = height / _height;
  690. node.a('node.height', height);
  691. setHeight.apply(this, arguments);
  692. resetPoints(1, ry);
  693. }
  694. })(Lib_12345Node6, Lib_12345Node6.getImage(), Lib_12345Node6compspts, Lib_12345Node6endCompspts, Lib_12345Node6startCompspts);
  695. var Lib_12345Node7points=[30, 20,24, 24],
  696. Lib_12345Node7rect=ht.Default.unionPoint([{x:30,y:20},{x:24,y:24}]),
  697. Lib_12345Node7compspts=[];
  698. _ratio = GD.getRatioWithRotation(0, ratio);
  699. var _startratio = GD.getRatioWithRotation(-0.588002617302485, ratio),
  700. _endratio = GD.getRatioWithRotation(2.55359003628731, ratio);
  701. for(var i=0;i<Lib_12345Node7points.length;i++){
  702. if(i%2==0){
  703. Lib_12345Node7compspts.push(Lib_12345Node7points[i]-Lib_12345Node7rect.x);
  704. }else{
  705. Lib_12345Node7compspts.push(Lib_12345Node7points[i]-Lib_12345Node7rect.y);
  706. }
  707. }
  708. var Lib_12345Node7ptslength=Lib_12345Node7compspts.length;
  709. if (Lib_12345Node7rect.height === 0) {
  710. Lib_12345Node7compspts[0] -= 0;
  711. Lib_12345Node7compspts[Lib_12345Node7ptslength-2] += 0;
  712. } else if (Lib_12345Node7rect.width === 0){
  713. Lib_12345Node7compspts[1] -= 0;
  714. Lib_12345Node7compspts[Lib_12345Node7ptslength-1] += 0;
  715. } else {
  716. Lib_12345Node7compspts[0] -= 0;
  717. Lib_12345Node7compspts[1] -= 0;
  718. Lib_12345Node7compspts[Lib_12345Node7ptslength-2] += 0;
  719. Lib_12345Node7compspts[Lib_12345Node7ptslength-1] += 0;
  720. }
  721. Lib_12345Node7 = new ht.Node();
  722. Lib_12345Node7.borderWidth = 1;
  723. Lib_12345Node7rect.width = Lib_12345Node7rect.width === 0 ? 0.0001 : Lib_12345Node7rect.width;
  724. Lib_12345Node7rect.height = Lib_12345Node7rect.height === 0 ? 0.0001 : Lib_12345Node7rect.height;
  725. var Lib_12345Node7endCompspts = [Lib_12345Node7compspts[Lib_12345Node7ptslength-2],Lib_12345Node7compspts[Lib_12345Node7ptslength-1],0,0];
  726. var Lib_12345Node7startCompspts = [Lib_12345Node7compspts[0],Lib_12345Node7compspts[1],0,0];
  727. Lib_12345Node7.setImage(GD.getPolyLineJSON());
  728. Lib_12345Node7.setPosition(Lib_12345Node7rect.x+Lib_12345Node7rect.width/2,Lib_12345Node7rect.y+Lib_12345Node7rect.height/2);
  729. Lib_12345Node7.setSize(Lib_12345Node7rect.width,Lib_12345Node7rect.height);
  730. Lib_12345Node7.setStyle("opacity",1);
  731. Lib_12345Node7.s({'pixelPerfect':true});
  732. Lib_12345Node7borderwidth=1;
  733. Lib_12345Node7.setRotation(0);
  734. dataModel.add(Lib_12345Node7);
  735. Lib_12345Node7.a('node.points',Lib_12345Node7compspts);
  736. Lib_12345Node7.a('node.segments',[1,2]);
  737. Lib_12345Node7.a('node.color','rgba(255,128,0,1)');
  738. Lib_12345Node7.a('node.borderPattern',getDashStyle("@borderPattern@"));
  739. Lib_12345Node7.a('node.borderColor','rgba(255,128,0,1)');
  740. Lib_12345Node7.a('node.background','rgba(255,128,0,1)');
  741. Lib_12345Node7.a('node.gradient','');
  742. Lib_12345Node7.a('node.gradientcolor','rgba(255,128,0,1)');
  743. Lib_12345Node7.a('node.endCompspts',Lib_12345Node7endCompspts);
  744. Lib_12345Node7.a('node.startCompspts',Lib_12345Node7startCompspts);
  745. (function (node, img, compspts, endCompspts, startCompspts) {
  746. var position = node.getPosition(),
  747. w = node.getWidth()*_ratio.ratioX,
  748. h = node.getHeight()*_ratio.ratioY;
  749. function resetPoints(rx, ry) {
  750. for (var i = 0, len = compspts.length; i < len; i++) {
  751. if (i%2 === 0) {
  752. compspts[i]*=rx;
  753. } else {
  754. compspts[i]*=ry;
  755. }
  756. }
  757. endCompspts[0] = compspts[compspts.length-2];
  758. endCompspts[1] = compspts[compspts.length-1];
  759. endCompspts[2] *= rx;
  760. endCompspts[3] *= ry;
  761. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  762. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  763. startCompspts[0] = compspts[0];
  764. startCompspts[1] = compspts[1];
  765. startCompspts[2] *= rx;
  766. startCompspts[3] *= ry;
  767. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  768. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  769. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  770. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  771. }
  772. node.setSize(w, h);
  773. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  774. node.a('node.width', w);
  775. node.a('node.height', h);
  776. resetPoints(_ratio.ratioX, _ratio.ratioY);
  777. node.borderWidth = 1;
  778. node.a('node.borderwidth',node.borderWidth);
  779. node._nodename = 'Lib_12345Node7';
  780. node._nodeType = 'line';
  781. zoomNodeList.push({
  782. node: node,
  783. attr: 'node.borderwidth'
  784. });
  785. var setWidth = node.setWidth,
  786. setHeight = node.setHeight,
  787. timer, rx = 1, ry = 1;
  788. node.setWidth = function (width) {
  789. var _width = this.getWidth();
  790. rx = width / _width;
  791. node.a('node.width', width);
  792. setWidth.apply(this, arguments);
  793. resetPoints(rx, 1);
  794. }
  795. node.setHeight = function (height) {
  796. var _height = this.getHeight();
  797. ry = height / _height;
  798. node.a('node.height', height);
  799. setHeight.apply(this, arguments);
  800. resetPoints(1, ry);
  801. }
  802. })(Lib_12345Node7, Lib_12345Node7.getImage(), Lib_12345Node7compspts, Lib_12345Node7endCompspts, Lib_12345Node7startCompspts);
  803. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  804. var Lib_12345Node8type = 'oval';
  805. var Lib_12345Node8 = new ht.Node(),
  806. Lib_12345Node8BorderWidth = 1*2;
  807. if (Lib_12345Node8type === 'arc') {
  808. Lib_12345Node8BorderWidth *= 1;
  809. }
  810. Lib_12345Node8.setImage(GD.getRectJSON(24.12697*_ratio.ratioX, 20.63269*_ratio.ratioY, Lib_12345Node8type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  811. Lib_12345Node8.setPosition(29*ratio.ratioX, 36*ratio.ratioY);
  812. Lib_12345Node8.setSize(24.12697*_ratio.ratioX, 20.63269*_ratio.ratioY);
  813. Lib_12345Node8.s({
  814. 'pixelPerfect':true
  815. /*@AddPara@*/
  816. });
  817. Lib_12345Node8.a('node.width', 24.12697*_ratio.ratioX);
  818. Lib_12345Node8.a('node.height', 20.63269*_ratio.ratioY);
  819. Lib_12345Node8.a('node.type', Lib_12345Node8type);
  820. Lib_12345Node8.a('node.rect', [0, 0, 24.12697*_ratio.ratioX, 20.63269*_ratio.ratioY]);
  821. Lib_12345Node8.a('node.background', 'rgba(255,255,255,0.003921569)');
  822. Lib_12345Node8.a('node.gradientcolor', '');
  823. Lib_12345Node8.a('node.gradient', '');
  824. Lib_12345Node8.a('node.borderwidth', Lib_12345Node8BorderWidth);
  825. Lib_12345Node8.a('node.color', 'rgba(255,128,0,1)');
  826. Lib_12345Node8.a('node.fillrect', [0,0,0,0]);
  827. Lib_12345Node8.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  828. Lib_12345Node8.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  829. Lib_12345Node8.a('node.fillgradient', '');
  830. if (Lib_12345Node8type !== 'rect') {
  831. Lib_12345Node8.a('node.arcFrom', parseFloat('@arcFrom@'));
  832. Lib_12345Node8.a('node.arcTo', parseFloat('@arcTo@'));
  833. Lib_12345Node8.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  834. }
  835. if (Lib_12345Node8type === 'arc') {
  836. Lib_12345Node8.a('node.arcOval', true);
  837. }
  838. Lib_12345Node8.setRotation(0*Math.PI/180);
  839. Lib_12345Node8.borderWidth = Lib_12345Node8BorderWidth;
  840. Lib_12345Node8.borderFillwidth = Lib_12345Node8BorderWidth;
  841. dataModel.add(Lib_12345Node8);
  842. Lib_12345Node8._nodename = 'Lib_12345Node8'
  843. Lib_12345Node8._nodeType = 'rect';
  844. zoomNodeList.push({
  845. node: Lib_12345Node8,
  846. attr: 'node.borderwidth'
  847. });
  848. (function (node, _img) {
  849. var setWidth = node.setWidth,
  850. setHeight = node.setHeight;
  851. node.setWidth = function (width) {
  852. if (width === this.getWidth()) return ;
  853. var height = this.getHeight();
  854. this.a('node.width', width);
  855. this.a('node.rect', [0,0,width, height]);
  856. setWidth.apply(this, arguments);
  857. }
  858. node.setHeight = function (height) {
  859. if (height === this.getHeight()) return ;
  860. var width = this.getWidth();
  861. this.a('node.height', height);
  862. this.a('node.rect', [0,0,width, height]);
  863. setHeight.apply(this, arguments);
  864. }
  865. })(Lib_12345Node8, Lib_12345Node8.getImage());var Lib_12345Node9points=[29, 30,29, 36],
  866. Lib_12345Node9rect=ht.Default.unionPoint([{x:29,y:30},{x:29,y:36}]),
  867. Lib_12345Node9compspts=[];
  868. _ratio = GD.getRatioWithRotation(0, ratio);
  869. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  870. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  871. for(var i=0;i<Lib_12345Node9points.length;i++){
  872. if(i%2==0){
  873. Lib_12345Node9compspts.push(Lib_12345Node9points[i]-Lib_12345Node9rect.x);
  874. }else{
  875. Lib_12345Node9compspts.push(Lib_12345Node9points[i]-Lib_12345Node9rect.y);
  876. }
  877. }
  878. var Lib_12345Node9ptslength=Lib_12345Node9compspts.length;
  879. if (Lib_12345Node9rect.height === 0) {
  880. Lib_12345Node9compspts[0] -= 0;
  881. Lib_12345Node9compspts[Lib_12345Node9ptslength-2] += 0;
  882. } else if (Lib_12345Node9rect.width === 0){
  883. Lib_12345Node9compspts[1] -= 0;
  884. Lib_12345Node9compspts[Lib_12345Node9ptslength-1] += 0;
  885. } else {
  886. Lib_12345Node9compspts[0] -= 0;
  887. Lib_12345Node9compspts[1] -= 0;
  888. Lib_12345Node9compspts[Lib_12345Node9ptslength-2] += 0;
  889. Lib_12345Node9compspts[Lib_12345Node9ptslength-1] += 0;
  890. }
  891. Lib_12345Node9 = new ht.Node();
  892. Lib_12345Node9.borderWidth = 1;
  893. Lib_12345Node9rect.width = Lib_12345Node9rect.width === 0 ? 0.0001 : Lib_12345Node9rect.width;
  894. Lib_12345Node9rect.height = Lib_12345Node9rect.height === 0 ? 0.0001 : Lib_12345Node9rect.height;
  895. var Lib_12345Node9endCompspts = [Lib_12345Node9compspts[Lib_12345Node9ptslength-2],Lib_12345Node9compspts[Lib_12345Node9ptslength-1],0,0];
  896. var Lib_12345Node9startCompspts = [Lib_12345Node9compspts[0],Lib_12345Node9compspts[1],0,0];
  897. Lib_12345Node9.setImage(GD.getPolyLineJSON());
  898. Lib_12345Node9.setPosition(Lib_12345Node9rect.x+Lib_12345Node9rect.width/2,Lib_12345Node9rect.y+Lib_12345Node9rect.height/2);
  899. Lib_12345Node9.setSize(Lib_12345Node9rect.width,Lib_12345Node9rect.height);
  900. Lib_12345Node9.setStyle("opacity",1);
  901. Lib_12345Node9.s({'pixelPerfect':true});
  902. Lib_12345Node9borderwidth=1;
  903. Lib_12345Node9.setRotation(0);
  904. dataModel.add(Lib_12345Node9);
  905. Lib_12345Node9.a('node.points',Lib_12345Node9compspts);
  906. Lib_12345Node9.a('node.segments',[1,2]);
  907. Lib_12345Node9.a('node.color','rgba(255,128,0,1)');
  908. Lib_12345Node9.a('node.borderPattern',getDashStyle("@borderPattern@"));
  909. Lib_12345Node9.a('node.borderColor','rgba(255,128,0,1)');
  910. Lib_12345Node9.a('node.background','rgba(255,128,0,1)');
  911. Lib_12345Node9.a('node.gradient','');
  912. Lib_12345Node9.a('node.gradientcolor','rgba(255,128,0,1)');
  913. Lib_12345Node9.a('node.endCompspts',Lib_12345Node9endCompspts);
  914. Lib_12345Node9.a('node.startCompspts',Lib_12345Node9startCompspts);
  915. (function (node, img, compspts, endCompspts, startCompspts) {
  916. var position = node.getPosition(),
  917. w = node.getWidth()*_ratio.ratioX,
  918. h = node.getHeight()*_ratio.ratioY;
  919. function resetPoints(rx, ry) {
  920. for (var i = 0, len = compspts.length; i < len; i++) {
  921. if (i%2 === 0) {
  922. compspts[i]*=rx;
  923. } else {
  924. compspts[i]*=ry;
  925. }
  926. }
  927. endCompspts[0] = compspts[compspts.length-2];
  928. endCompspts[1] = compspts[compspts.length-1];
  929. endCompspts[2] *= rx;
  930. endCompspts[3] *= ry;
  931. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  932. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  933. startCompspts[0] = compspts[0];
  934. startCompspts[1] = compspts[1];
  935. startCompspts[2] *= rx;
  936. startCompspts[3] *= ry;
  937. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  938. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  939. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  940. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  941. }
  942. node.setSize(w, h);
  943. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  944. node.a('node.width', w);
  945. node.a('node.height', h);
  946. resetPoints(_ratio.ratioX, _ratio.ratioY);
  947. node.borderWidth = 1;
  948. node.a('node.borderwidth',node.borderWidth);
  949. node._nodename = 'Lib_12345Node9';
  950. node._nodeType = 'line';
  951. zoomNodeList.push({
  952. node: node,
  953. attr: 'node.borderwidth'
  954. });
  955. var setWidth = node.setWidth,
  956. setHeight = node.setHeight,
  957. timer, rx = 1, ry = 1;
  958. node.setWidth = function (width) {
  959. var _width = this.getWidth();
  960. rx = width / _width;
  961. node.a('node.width', width);
  962. setWidth.apply(this, arguments);
  963. resetPoints(rx, 1);
  964. }
  965. node.setHeight = function (height) {
  966. var _height = this.getHeight();
  967. ry = height / _height;
  968. node.a('node.height', height);
  969. setHeight.apply(this, arguments);
  970. resetPoints(1, ry);
  971. }
  972. })(Lib_12345Node9, Lib_12345Node9.getImage(), Lib_12345Node9compspts, Lib_12345Node9endCompspts, Lib_12345Node9startCompspts);
  973. var Lib_12345Node10points=[29, 36,35, 41],
  974. Lib_12345Node10rect=ht.Default.unionPoint([{x:29,y:36},{x:35,y:41}]),
  975. Lib_12345Node10compspts=[];
  976. _ratio = GD.getRatioWithRotation(0, ratio);
  977. var _startratio = GD.getRatioWithRotation(3.83633091806099, ratio),
  978. _endratio = GD.getRatioWithRotation(0.694738264471199, ratio);
  979. for(var i=0;i<Lib_12345Node10points.length;i++){
  980. if(i%2==0){
  981. Lib_12345Node10compspts.push(Lib_12345Node10points[i]-Lib_12345Node10rect.x);
  982. }else{
  983. Lib_12345Node10compspts.push(Lib_12345Node10points[i]-Lib_12345Node10rect.y);
  984. }
  985. }
  986. var Lib_12345Node10ptslength=Lib_12345Node10compspts.length;
  987. if (Lib_12345Node10rect.height === 0) {
  988. Lib_12345Node10compspts[0] -= 0;
  989. Lib_12345Node10compspts[Lib_12345Node10ptslength-2] += 0;
  990. } else if (Lib_12345Node10rect.width === 0){
  991. Lib_12345Node10compspts[1] -= 0;
  992. Lib_12345Node10compspts[Lib_12345Node10ptslength-1] += 0;
  993. } else {
  994. Lib_12345Node10compspts[0] -= 0;
  995. Lib_12345Node10compspts[1] -= 0;
  996. Lib_12345Node10compspts[Lib_12345Node10ptslength-2] += 0;
  997. Lib_12345Node10compspts[Lib_12345Node10ptslength-1] += 0;
  998. }
  999. Lib_12345Node10 = new ht.Node();
  1000. Lib_12345Node10.borderWidth = 1;
  1001. Lib_12345Node10rect.width = Lib_12345Node10rect.width === 0 ? 0.0001 : Lib_12345Node10rect.width;
  1002. Lib_12345Node10rect.height = Lib_12345Node10rect.height === 0 ? 0.0001 : Lib_12345Node10rect.height;
  1003. var Lib_12345Node10endCompspts = [Lib_12345Node10compspts[Lib_12345Node10ptslength-2],Lib_12345Node10compspts[Lib_12345Node10ptslength-1],0,0];
  1004. var Lib_12345Node10startCompspts = [Lib_12345Node10compspts[0],Lib_12345Node10compspts[1],0,0];
  1005. Lib_12345Node10.setImage(GD.getPolyLineJSON());
  1006. Lib_12345Node10.setPosition(Lib_12345Node10rect.x+Lib_12345Node10rect.width/2,Lib_12345Node10rect.y+Lib_12345Node10rect.height/2);
  1007. Lib_12345Node10.setSize(Lib_12345Node10rect.width,Lib_12345Node10rect.height);
  1008. Lib_12345Node10.setStyle("opacity",1);
  1009. Lib_12345Node10.s({'pixelPerfect':true});
  1010. Lib_12345Node10borderwidth=1;
  1011. Lib_12345Node10.setRotation(0);
  1012. dataModel.add(Lib_12345Node10);
  1013. Lib_12345Node10.a('node.points',Lib_12345Node10compspts);
  1014. Lib_12345Node10.a('node.segments',[1,2]);
  1015. Lib_12345Node10.a('node.color','rgba(255,128,0,1)');
  1016. Lib_12345Node10.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1017. Lib_12345Node10.a('node.borderColor','rgba(255,128,0,1)');
  1018. Lib_12345Node10.a('node.background','rgba(255,128,0,1)');
  1019. Lib_12345Node10.a('node.gradient','');
  1020. Lib_12345Node10.a('node.gradientcolor','rgba(255,128,0,1)');
  1021. Lib_12345Node10.a('node.endCompspts',Lib_12345Node10endCompspts);
  1022. Lib_12345Node10.a('node.startCompspts',Lib_12345Node10startCompspts);
  1023. (function (node, img, compspts, endCompspts, startCompspts) {
  1024. var position = node.getPosition(),
  1025. w = node.getWidth()*_ratio.ratioX,
  1026. h = node.getHeight()*_ratio.ratioY;
  1027. function resetPoints(rx, ry) {
  1028. for (var i = 0, len = compspts.length; i < len; i++) {
  1029. if (i%2 === 0) {
  1030. compspts[i]*=rx;
  1031. } else {
  1032. compspts[i]*=ry;
  1033. }
  1034. }
  1035. endCompspts[0] = compspts[compspts.length-2];
  1036. endCompspts[1] = compspts[compspts.length-1];
  1037. endCompspts[2] *= rx;
  1038. endCompspts[3] *= ry;
  1039. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1040. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1041. startCompspts[0] = compspts[0];
  1042. startCompspts[1] = compspts[1];
  1043. startCompspts[2] *= rx;
  1044. startCompspts[3] *= ry;
  1045. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1046. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1047. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1048. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1049. }
  1050. node.setSize(w, h);
  1051. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1052. node.a('node.width', w);
  1053. node.a('node.height', h);
  1054. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1055. node.borderWidth = 1;
  1056. node.a('node.borderwidth',node.borderWidth);
  1057. node._nodename = 'Lib_12345Node10';
  1058. node._nodeType = 'line';
  1059. zoomNodeList.push({
  1060. node: node,
  1061. attr: 'node.borderwidth'
  1062. });
  1063. var setWidth = node.setWidth,
  1064. setHeight = node.setHeight,
  1065. timer, rx = 1, ry = 1;
  1066. node.setWidth = function (width) {
  1067. var _width = this.getWidth();
  1068. rx = width / _width;
  1069. node.a('node.width', width);
  1070. setWidth.apply(this, arguments);
  1071. resetPoints(rx, 1);
  1072. }
  1073. node.setHeight = function (height) {
  1074. var _height = this.getHeight();
  1075. ry = height / _height;
  1076. node.a('node.height', height);
  1077. setHeight.apply(this, arguments);
  1078. resetPoints(1, ry);
  1079. }
  1080. })(Lib_12345Node10, Lib_12345Node10.getImage(), Lib_12345Node10compspts, Lib_12345Node10endCompspts, Lib_12345Node10startCompspts);
  1081. var Lib_12345Node11points=[29, 36,23, 41],
  1082. Lib_12345Node11rect=ht.Default.unionPoint([{x:29,y:36},{x:23,y:41}]),
  1083. Lib_12345Node11compspts=[];
  1084. _ratio = GD.getRatioWithRotation(0, ratio);
  1085. var _startratio = GD.getRatioWithRotation(-0.694738264471199, ratio),
  1086. _endratio = GD.getRatioWithRotation(2.44685438911859, ratio);
  1087. for(var i=0;i<Lib_12345Node11points.length;i++){
  1088. if(i%2==0){
  1089. Lib_12345Node11compspts.push(Lib_12345Node11points[i]-Lib_12345Node11rect.x);
  1090. }else{
  1091. Lib_12345Node11compspts.push(Lib_12345Node11points[i]-Lib_12345Node11rect.y);
  1092. }
  1093. }
  1094. var Lib_12345Node11ptslength=Lib_12345Node11compspts.length;
  1095. if (Lib_12345Node11rect.height === 0) {
  1096. Lib_12345Node11compspts[0] -= 0;
  1097. Lib_12345Node11compspts[Lib_12345Node11ptslength-2] += 0;
  1098. } else if (Lib_12345Node11rect.width === 0){
  1099. Lib_12345Node11compspts[1] -= 0;
  1100. Lib_12345Node11compspts[Lib_12345Node11ptslength-1] += 0;
  1101. } else {
  1102. Lib_12345Node11compspts[0] -= 0;
  1103. Lib_12345Node11compspts[1] -= 0;
  1104. Lib_12345Node11compspts[Lib_12345Node11ptslength-2] += 0;
  1105. Lib_12345Node11compspts[Lib_12345Node11ptslength-1] += 0;
  1106. }
  1107. Lib_12345Node11 = new ht.Node();
  1108. Lib_12345Node11.borderWidth = 1;
  1109. Lib_12345Node11rect.width = Lib_12345Node11rect.width === 0 ? 0.0001 : Lib_12345Node11rect.width;
  1110. Lib_12345Node11rect.height = Lib_12345Node11rect.height === 0 ? 0.0001 : Lib_12345Node11rect.height;
  1111. var Lib_12345Node11endCompspts = [Lib_12345Node11compspts[Lib_12345Node11ptslength-2],Lib_12345Node11compspts[Lib_12345Node11ptslength-1],0,0];
  1112. var Lib_12345Node11startCompspts = [Lib_12345Node11compspts[0],Lib_12345Node11compspts[1],0,0];
  1113. Lib_12345Node11.setImage(GD.getPolyLineJSON());
  1114. Lib_12345Node11.setPosition(Lib_12345Node11rect.x+Lib_12345Node11rect.width/2,Lib_12345Node11rect.y+Lib_12345Node11rect.height/2);
  1115. Lib_12345Node11.setSize(Lib_12345Node11rect.width,Lib_12345Node11rect.height);
  1116. Lib_12345Node11.setStyle("opacity",1);
  1117. Lib_12345Node11.s({'pixelPerfect':true});
  1118. Lib_12345Node11borderwidth=1;
  1119. Lib_12345Node11.setRotation(0);
  1120. dataModel.add(Lib_12345Node11);
  1121. Lib_12345Node11.a('node.points',Lib_12345Node11compspts);
  1122. Lib_12345Node11.a('node.segments',[1,2]);
  1123. Lib_12345Node11.a('node.color','rgba(255,128,0,1)');
  1124. Lib_12345Node11.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1125. Lib_12345Node11.a('node.borderColor','rgba(255,128,0,1)');
  1126. Lib_12345Node11.a('node.background','rgba(255,128,0,1)');
  1127. Lib_12345Node11.a('node.gradient','');
  1128. Lib_12345Node11.a('node.gradientcolor','rgba(255,128,0,1)');
  1129. Lib_12345Node11.a('node.endCompspts',Lib_12345Node11endCompspts);
  1130. Lib_12345Node11.a('node.startCompspts',Lib_12345Node11startCompspts);
  1131. (function (node, img, compspts, endCompspts, startCompspts) {
  1132. var position = node.getPosition(),
  1133. w = node.getWidth()*_ratio.ratioX,
  1134. h = node.getHeight()*_ratio.ratioY;
  1135. function resetPoints(rx, ry) {
  1136. for (var i = 0, len = compspts.length; i < len; i++) {
  1137. if (i%2 === 0) {
  1138. compspts[i]*=rx;
  1139. } else {
  1140. compspts[i]*=ry;
  1141. }
  1142. }
  1143. endCompspts[0] = compspts[compspts.length-2];
  1144. endCompspts[1] = compspts[compspts.length-1];
  1145. endCompspts[2] *= rx;
  1146. endCompspts[3] *= ry;
  1147. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1148. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1149. startCompspts[0] = compspts[0];
  1150. startCompspts[1] = compspts[1];
  1151. startCompspts[2] *= rx;
  1152. startCompspts[3] *= ry;
  1153. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1154. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1155. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1156. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1157. }
  1158. node.setSize(w, h);
  1159. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1160. node.a('node.width', w);
  1161. node.a('node.height', h);
  1162. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1163. node.borderWidth = 1;
  1164. node.a('node.borderwidth',node.borderWidth);
  1165. node._nodename = 'Lib_12345Node11';
  1166. node._nodeType = 'line';
  1167. zoomNodeList.push({
  1168. node: node,
  1169. attr: 'node.borderwidth'
  1170. });
  1171. var setWidth = node.setWidth,
  1172. setHeight = node.setHeight,
  1173. timer, rx = 1, ry = 1;
  1174. node.setWidth = function (width) {
  1175. var _width = this.getWidth();
  1176. rx = width / _width;
  1177. node.a('node.width', width);
  1178. setWidth.apply(this, arguments);
  1179. resetPoints(rx, 1);
  1180. }
  1181. node.setHeight = function (height) {
  1182. var _height = this.getHeight();
  1183. ry = height / _height;
  1184. node.a('node.height', height);
  1185. setHeight.apply(this, arguments);
  1186. resetPoints(1, ry);
  1187. }
  1188. })(Lib_12345Node11, Lib_12345Node11.getImage(), Lib_12345Node11compspts, Lib_12345Node11endCompspts, Lib_12345Node11startCompspts);
  1189. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  1190. var Lib_12345Node12_0type = 'rect';
  1191. var Lib_12345Node12_0 = new ht.Node(),
  1192. Lib_12345Node12_0BorderWidth = 1*2;
  1193. if (Lib_12345Node12_0type === 'arc') {
  1194. Lib_12345Node12_0BorderWidth *= 1;
  1195. }
  1196. Lib_12345Node12_0.setImage(GD.getRectJSON(15.36963*_ratio.ratioX, 25.91444*_ratio.ratioY, Lib_12345Node12_0type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  1197. Lib_12345Node12_0.setPosition(76*ratio.ratioX, 29*ratio.ratioY);
  1198. Lib_12345Node12_0.setSize(15.36963*_ratio.ratioX, 25.91444*_ratio.ratioY);
  1199. Lib_12345Node12_0.s({
  1200. 'pixelPerfect':true
  1201. /*@AddPara@*/
  1202. });
  1203. Lib_12345Node12_0.a('node.width', 15.36963*_ratio.ratioX);
  1204. Lib_12345Node12_0.a('node.height', 25.91444*_ratio.ratioY);
  1205. Lib_12345Node12_0.a('node.type', Lib_12345Node12_0type);
  1206. Lib_12345Node12_0.a('node.rect', [0, 0, 15.36963*_ratio.ratioX, 25.91444*_ratio.ratioY]);
  1207. Lib_12345Node12_0.a('node.background', 'rgba(255,255,255,0.003921569)');
  1208. Lib_12345Node12_0.a('node.gradientcolor', '');
  1209. Lib_12345Node12_0.a('node.gradient', '');
  1210. Lib_12345Node12_0.a('node.borderwidth', Lib_12345Node12_0BorderWidth);
  1211. Lib_12345Node12_0.a('node.color', 'rgba(255,128,0,1)');
  1212. Lib_12345Node12_0.a('node.fillrect', [0,0,0,0]);
  1213. Lib_12345Node12_0.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  1214. Lib_12345Node12_0.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  1215. Lib_12345Node12_0.a('node.fillgradient', '');
  1216. if (Lib_12345Node12_0type !== 'rect') {
  1217. Lib_12345Node12_0.a('node.arcFrom', parseFloat('@arcFrom@'));
  1218. Lib_12345Node12_0.a('node.arcTo', parseFloat('@arcTo@'));
  1219. Lib_12345Node12_0.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  1220. }
  1221. if (Lib_12345Node12_0type === 'arc') {
  1222. Lib_12345Node12_0.a('node.arcOval', true);
  1223. }
  1224. Lib_12345Node12_0.setRotation(0*Math.PI/180);
  1225. Lib_12345Node12_0.borderWidth = Lib_12345Node12_0BorderWidth;
  1226. Lib_12345Node12_0.borderFillwidth = Lib_12345Node12_0BorderWidth;
  1227. dataModel.add(Lib_12345Node12_0);
  1228. Lib_12345Node12_0._nodename = 'Lib_12345Node12_0'
  1229. Lib_12345Node12_0._nodeType = 'rect';
  1230. zoomNodeList.push({
  1231. node: Lib_12345Node12_0,
  1232. attr: 'node.borderwidth'
  1233. });
  1234. (function (node, _img) {
  1235. var setWidth = node.setWidth,
  1236. setHeight = node.setHeight;
  1237. node.setWidth = function (width) {
  1238. if (width === this.getWidth()) return ;
  1239. var height = this.getHeight();
  1240. this.a('node.width', width);
  1241. this.a('node.rect', [0,0,width, height]);
  1242. setWidth.apply(this, arguments);
  1243. }
  1244. node.setHeight = function (height) {
  1245. if (height === this.getHeight()) return ;
  1246. var width = this.getWidth();
  1247. this.a('node.height', height);
  1248. this.a('node.rect', [0,0,width, height]);
  1249. setHeight.apply(this, arguments);
  1250. }
  1251. })(Lib_12345Node12_0, Lib_12345Node12_0.getImage());var Lib_12345Node12_1points=[76, 42,76, 51],
  1252. Lib_12345Node12_1rect=ht.Default.unionPoint([{x:76,y:42},{x:76,y:51}]),
  1253. Lib_12345Node12_1compspts=[];
  1254. _ratio = GD.getRatioWithRotation(0, ratio);
  1255. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  1256. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  1257. for(var i=0;i<Lib_12345Node12_1points.length;i++){
  1258. if(i%2==0){
  1259. Lib_12345Node12_1compspts.push(Lib_12345Node12_1points[i]-Lib_12345Node12_1rect.x);
  1260. }else{
  1261. Lib_12345Node12_1compspts.push(Lib_12345Node12_1points[i]-Lib_12345Node12_1rect.y);
  1262. }
  1263. }
  1264. var Lib_12345Node12_1ptslength=Lib_12345Node12_1compspts.length;
  1265. if (Lib_12345Node12_1rect.height === 0) {
  1266. Lib_12345Node12_1compspts[0] -= 0;
  1267. Lib_12345Node12_1compspts[Lib_12345Node12_1ptslength-2] += 0;
  1268. } else if (Lib_12345Node12_1rect.width === 0){
  1269. Lib_12345Node12_1compspts[1] -= 0;
  1270. Lib_12345Node12_1compspts[Lib_12345Node12_1ptslength-1] += 0;
  1271. } else {
  1272. Lib_12345Node12_1compspts[0] -= 0;
  1273. Lib_12345Node12_1compspts[1] -= 0;
  1274. Lib_12345Node12_1compspts[Lib_12345Node12_1ptslength-2] += 0;
  1275. Lib_12345Node12_1compspts[Lib_12345Node12_1ptslength-1] += 0;
  1276. }
  1277. Lib_12345Node12_1 = new ht.Node();
  1278. Lib_12345Node12_1.borderWidth = 1;
  1279. Lib_12345Node12_1rect.width = Lib_12345Node12_1rect.width === 0 ? 0.0001 : Lib_12345Node12_1rect.width;
  1280. Lib_12345Node12_1rect.height = Lib_12345Node12_1rect.height === 0 ? 0.0001 : Lib_12345Node12_1rect.height;
  1281. var Lib_12345Node12_1endCompspts = [Lib_12345Node12_1compspts[Lib_12345Node12_1ptslength-2],Lib_12345Node12_1compspts[Lib_12345Node12_1ptslength-1],0,0];
  1282. var Lib_12345Node12_1startCompspts = [Lib_12345Node12_1compspts[0],Lib_12345Node12_1compspts[1],0,0];
  1283. Lib_12345Node12_1.setImage(GD.getPolyLineJSON());
  1284. Lib_12345Node12_1.setPosition(Lib_12345Node12_1rect.x+Lib_12345Node12_1rect.width/2,Lib_12345Node12_1rect.y+Lib_12345Node12_1rect.height/2);
  1285. Lib_12345Node12_1.setSize(Lib_12345Node12_1rect.width,Lib_12345Node12_1rect.height);
  1286. Lib_12345Node12_1.setStyle("opacity",1);
  1287. Lib_12345Node12_1.s({'pixelPerfect':true});
  1288. Lib_12345Node12_1borderwidth=1;
  1289. Lib_12345Node12_1.setRotation(0);
  1290. dataModel.add(Lib_12345Node12_1);
  1291. Lib_12345Node12_1.a('node.points',Lib_12345Node12_1compspts);
  1292. Lib_12345Node12_1.a('node.segments',[1,2]);
  1293. Lib_12345Node12_1.a('node.color','rgba(255,128,0,1)');
  1294. Lib_12345Node12_1.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1295. Lib_12345Node12_1.a('node.borderColor','rgba(255,128,0,1)');
  1296. Lib_12345Node12_1.a('node.background','rgba(255,128,0,1)');
  1297. Lib_12345Node12_1.a('node.gradient','');
  1298. Lib_12345Node12_1.a('node.gradientcolor','rgba(255,128,0,1)');
  1299. Lib_12345Node12_1.a('node.endCompspts',Lib_12345Node12_1endCompspts);
  1300. Lib_12345Node12_1.a('node.startCompspts',Lib_12345Node12_1startCompspts);
  1301. (function (node, img, compspts, endCompspts, startCompspts) {
  1302. var position = node.getPosition(),
  1303. w = node.getWidth()*_ratio.ratioX,
  1304. h = node.getHeight()*_ratio.ratioY;
  1305. function resetPoints(rx, ry) {
  1306. for (var i = 0, len = compspts.length; i < len; i++) {
  1307. if (i%2 === 0) {
  1308. compspts[i]*=rx;
  1309. } else {
  1310. compspts[i]*=ry;
  1311. }
  1312. }
  1313. endCompspts[0] = compspts[compspts.length-2];
  1314. endCompspts[1] = compspts[compspts.length-1];
  1315. endCompspts[2] *= rx;
  1316. endCompspts[3] *= ry;
  1317. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1318. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1319. startCompspts[0] = compspts[0];
  1320. startCompspts[1] = compspts[1];
  1321. startCompspts[2] *= rx;
  1322. startCompspts[3] *= ry;
  1323. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1324. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1325. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1326. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1327. }
  1328. node.setSize(w, h);
  1329. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1330. node.a('node.width', w);
  1331. node.a('node.height', h);
  1332. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1333. node.borderWidth = 1;
  1334. node.a('node.borderwidth',node.borderWidth);
  1335. node._nodename = 'Lib_12345Node12_1';
  1336. node._nodeType = 'line';
  1337. zoomNodeList.push({
  1338. node: node,
  1339. attr: 'node.borderwidth'
  1340. });
  1341. var setWidth = node.setWidth,
  1342. setHeight = node.setHeight,
  1343. timer, rx = 1, ry = 1;
  1344. node.setWidth = function (width) {
  1345. var _width = this.getWidth();
  1346. rx = width / _width;
  1347. node.a('node.width', width);
  1348. setWidth.apply(this, arguments);
  1349. resetPoints(rx, 1);
  1350. }
  1351. node.setHeight = function (height) {
  1352. var _height = this.getHeight();
  1353. ry = height / _height;
  1354. node.a('node.height', height);
  1355. setHeight.apply(this, arguments);
  1356. resetPoints(1, ry);
  1357. }
  1358. })(Lib_12345Node12_1, Lib_12345Node12_1.getImage(), Lib_12345Node12_1compspts, Lib_12345Node12_1endCompspts, Lib_12345Node12_1startCompspts);
  1359. var Lib_12345Node12_2points=[76, 0,76, 28],
  1360. Lib_12345Node12_2rect=ht.Default.unionPoint([{x:76,y:0},{x:76,y:28}]),
  1361. Lib_12345Node12_2compspts=[];
  1362. _ratio = GD.getRatioWithRotation(0, ratio);
  1363. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  1364. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  1365. for(var i=0;i<Lib_12345Node12_2points.length;i++){
  1366. if(i%2==0){
  1367. Lib_12345Node12_2compspts.push(Lib_12345Node12_2points[i]-Lib_12345Node12_2rect.x);
  1368. }else{
  1369. Lib_12345Node12_2compspts.push(Lib_12345Node12_2points[i]-Lib_12345Node12_2rect.y);
  1370. }
  1371. }
  1372. var Lib_12345Node12_2ptslength=Lib_12345Node12_2compspts.length;
  1373. if (Lib_12345Node12_2rect.height === 0) {
  1374. Lib_12345Node12_2compspts[0] -= 0;
  1375. Lib_12345Node12_2compspts[Lib_12345Node12_2ptslength-2] += 0;
  1376. } else if (Lib_12345Node12_2rect.width === 0){
  1377. Lib_12345Node12_2compspts[1] -= 0;
  1378. Lib_12345Node12_2compspts[Lib_12345Node12_2ptslength-1] += 0;
  1379. } else {
  1380. Lib_12345Node12_2compspts[0] -= 0;
  1381. Lib_12345Node12_2compspts[1] -= 0;
  1382. Lib_12345Node12_2compspts[Lib_12345Node12_2ptslength-2] += 0;
  1383. Lib_12345Node12_2compspts[Lib_12345Node12_2ptslength-1] += 0;
  1384. }
  1385. Lib_12345Node12_2 = new ht.Node();
  1386. Lib_12345Node12_2.borderWidth = 1;
  1387. Lib_12345Node12_2rect.width = Lib_12345Node12_2rect.width === 0 ? 0.0001 : Lib_12345Node12_2rect.width;
  1388. Lib_12345Node12_2rect.height = Lib_12345Node12_2rect.height === 0 ? 0.0001 : Lib_12345Node12_2rect.height;
  1389. var Lib_12345Node12_2endCompspts = [Lib_12345Node12_2compspts[Lib_12345Node12_2ptslength-2],Lib_12345Node12_2compspts[Lib_12345Node12_2ptslength-1],0,0];
  1390. var Lib_12345Node12_2startCompspts = [Lib_12345Node12_2compspts[0],Lib_12345Node12_2compspts[1],0,0];
  1391. Lib_12345Node12_2.setImage(GD.getPolyLineJSON());
  1392. Lib_12345Node12_2.setPosition(Lib_12345Node12_2rect.x+Lib_12345Node12_2rect.width/2,Lib_12345Node12_2rect.y+Lib_12345Node12_2rect.height/2);
  1393. Lib_12345Node12_2.setSize(Lib_12345Node12_2rect.width,Lib_12345Node12_2rect.height);
  1394. Lib_12345Node12_2.setStyle("opacity",1);
  1395. Lib_12345Node12_2.s({'pixelPerfect':true});
  1396. Lib_12345Node12_2borderwidth=1;
  1397. Lib_12345Node12_2.setRotation(0);
  1398. dataModel.add(Lib_12345Node12_2);
  1399. Lib_12345Node12_2.a('node.points',Lib_12345Node12_2compspts);
  1400. Lib_12345Node12_2.a('node.segments',[1,2]);
  1401. Lib_12345Node12_2.a('node.color','rgba(255,128,0,1)');
  1402. Lib_12345Node12_2.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1403. Lib_12345Node12_2.a('node.borderColor','rgba(255,128,0,1)');
  1404. Lib_12345Node12_2.a('node.background','rgba(255,128,0,1)');
  1405. Lib_12345Node12_2.a('node.gradient','');
  1406. Lib_12345Node12_2.a('node.gradientcolor','rgba(255,128,0,1)');
  1407. Lib_12345Node12_2.a('node.endCompspts',Lib_12345Node12_2endCompspts);
  1408. Lib_12345Node12_2.a('node.startCompspts',Lib_12345Node12_2startCompspts);
  1409. (function (node, img, compspts, endCompspts, startCompspts) {
  1410. var position = node.getPosition(),
  1411. w = node.getWidth()*_ratio.ratioX,
  1412. h = node.getHeight()*_ratio.ratioY;
  1413. function resetPoints(rx, ry) {
  1414. for (var i = 0, len = compspts.length; i < len; i++) {
  1415. if (i%2 === 0) {
  1416. compspts[i]*=rx;
  1417. } else {
  1418. compspts[i]*=ry;
  1419. }
  1420. }
  1421. endCompspts[0] = compspts[compspts.length-2];
  1422. endCompspts[1] = compspts[compspts.length-1];
  1423. endCompspts[2] *= rx;
  1424. endCompspts[3] *= ry;
  1425. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1426. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1427. startCompspts[0] = compspts[0];
  1428. startCompspts[1] = compspts[1];
  1429. startCompspts[2] *= rx;
  1430. startCompspts[3] *= ry;
  1431. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1432. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1433. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1434. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1435. }
  1436. node.setSize(w, h);
  1437. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1438. node.a('node.width', w);
  1439. node.a('node.height', h);
  1440. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1441. node.borderWidth = 1;
  1442. node.a('node.borderwidth',node.borderWidth);
  1443. node._nodename = 'Lib_12345Node12_2';
  1444. node._nodeType = 'line';
  1445. zoomNodeList.push({
  1446. node: node,
  1447. attr: 'node.borderwidth'
  1448. });
  1449. var setWidth = node.setWidth,
  1450. setHeight = node.setHeight,
  1451. timer, rx = 1, ry = 1;
  1452. node.setWidth = function (width) {
  1453. var _width = this.getWidth();
  1454. rx = width / _width;
  1455. node.a('node.width', width);
  1456. setWidth.apply(this, arguments);
  1457. resetPoints(rx, 1);
  1458. }
  1459. node.setHeight = function (height) {
  1460. var _height = this.getHeight();
  1461. ry = height / _height;
  1462. node.a('node.height', height);
  1463. setHeight.apply(this, arguments);
  1464. resetPoints(1, ry);
  1465. }
  1466. })(Lib_12345Node12_2, Lib_12345Node12_2.getImage(), Lib_12345Node12_2compspts, Lib_12345Node12_2endCompspts, Lib_12345Node12_2startCompspts);
  1467. var Lib_12345Node12_3rect=ht.Default.unionPoint([{x: 71, y: 21},{x: 71, y: 21},{x: 80, y: 21},{x: 76, y: 29}]),
  1468. Lib_12345Node12_3points=[71,21,71,21,80,21,76,29],
  1469. Lib_12345Node12_3compsPoints=[],
  1470. Lib_12345Node12_3SetPoints = [{x: 71, y: 21},{x: 71, y: 21},{x: 80, y: 21},{x: 76, y: 29}],
  1471. Lib_12345Node12_3setSegments = [1,2,2,2];
  1472. _ratio = GD.getRatioWithRotation(0, ratio);
  1473. for(var i=0;i<Lib_12345Node12_3points.length;i++){
  1474. if(i%2==0){
  1475. Lib_12345Node12_3compsPoints.push(Lib_12345Node12_3points[i]-Lib_12345Node12_3rect.x);
  1476. }else{
  1477. Lib_12345Node12_3compsPoints.push(Lib_12345Node12_3points[i]-Lib_12345Node12_3rect.y);
  1478. }
  1479. }
  1480. var Lib_12345Node12_3 = new ht.Node();
  1481. Lib_12345Node12_3.setImage(GD.getPolyGonJSON());
  1482. Lib_12345Node12_3.setPosition(Lib_12345Node12_3rect.x + Lib_12345Node12_3rect.width/2, Lib_12345Node12_3rect.y + Lib_12345Node12_3rect.height/2);
  1483. Lib_12345Node12_3.setSize(Lib_12345Node12_3rect.width, Lib_12345Node12_3rect.height);
  1484. Lib_12345Node12_3.setRotation(0);
  1485. Lib_12345Node12_3.borderWidth=1;
  1486. Lib_12345Node12_3.borderFillwidth=1*2;
  1487. Lib_12345Node12_3.s({'pixelPerfect':true});
  1488. dataModel.add(Lib_12345Node12_3);
  1489. // Lib_12345Node12_3.a('node.width', Lib_12345Node12_3rect.width*_ratio.ratioX);
  1490. // Lib_12345Node12_3.a('node.height', Lib_12345Node12_3rect.height*_ratio.ratioY);
  1491. Lib_12345Node12_3.a('node.clip', function(g,width,height,data) {
  1492. var clippoints = Lib_12345Node12_3SetPoints;
  1493. if(clippoints.length<=3) return;
  1494. if(Lib_12345Node12_3.a('Lib_12345Node12_3.isFill')=="false") return;
  1495. var clipcompsPoints=[];
  1496. var rect = ht.Default.unionPoint(clippoints);
  1497. for(var i=0;i<clippoints.length;i++){
  1498. clipcompsPoints.push({x:clippoints[i].x-rect.x,y:clippoints[i].y-rect.y});
  1499. }
  1500. var clipsegments=Lib_12345Node12_3setSegments;
  1501. g.beginPath();
  1502. drawPoints(g,clipcompsPoints,clipsegments);
  1503. g.clip();
  1504. })
  1505. Lib_12345Node12_3.a('node.type', 'shape');
  1506. Lib_12345Node12_3.a('node.comsPoints', Lib_12345Node12_3compsPoints);
  1507. Lib_12345Node12_3.a('node.closePath', true);
  1508. Lib_12345Node12_3.a('node.borderwidth', 1);
  1509. Lib_12345Node12_3.a('node.color', 'rgba(255,128,0,1)');
  1510. Lib_12345Node12_3.a('node.background','rgba(255,128,0,1)');
  1511. Lib_12345Node12_3.a('node.closePath', true);
  1512. Lib_12345Node12_3.a('node.closePath', true);
  1513. Lib_12345Node12_3.a('node.gradient','');
  1514. Lib_12345Node12_3.a('node.gradientcolor','rgba(255,128,0,1)');
  1515. Lib_12345Node12_3.a('node.isFill','false');
  1516. Lib_12345Node12_3.a('node.original',[0,0,0,0]);
  1517. Lib_12345Node12_3.a('node.fillrect',[0,0,0,0]);
  1518. Lib_12345Node12_3.a('node.fillbackcolor','rgba(255,128,0,1)');
  1519. Lib_12345Node12_3.a('node.fillgradient','');
  1520. Lib_12345Node12_3.a('node.fillgradientcolor','rgba(255,128,0,1)');
  1521. Lib_12345Node12_3.a('node.segments',Lib_12345Node12_3setSegments);
  1522. Lib_12345Node12_3.a('node.borderPattern',"");
  1523. (function (node, nodecompsPoints, setPoints) {
  1524. var w = node.getWidth()*_ratio.ratioX,
  1525. h = node.getHeight()*_ratio.ratioY,
  1526. img = node.getImage();
  1527. function resetPoints(rx, ry) {
  1528. for (var i = 0, len = nodecompsPoints.length; i < len; i++) {
  1529. if (i%2 === 0) {
  1530. nodecompsPoints[i]*=rx;
  1531. } else {
  1532. nodecompsPoints[i]*=ry;
  1533. }
  1534. if (setPoints[i]) {
  1535. setPoints[i].x *= rx;
  1536. setPoints[i].y *= ry;
  1537. }
  1538. }
  1539. }
  1540. node.setSize(w, h);
  1541. node.a('node.width', w);
  1542. node.a('node.height', h);
  1543. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1544. var position = node.getPosition();
  1545. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1546. node._nodename = 'Lib_12345Node12_3';
  1547. node._nodeType = 'polygon';
  1548. zoomNodeList.push({
  1549. node: node,
  1550. attr: 'node.borderwidth'
  1551. });
  1552. // 重载setWidth, setHeight
  1553. var setWidth = node.setWidth,
  1554. setHeight = node.setHeight,
  1555. timer, rx = 1, ry = 1;
  1556. node.setWidth = function (width) {
  1557. var _width = this.getWidth();
  1558. rx = width / _width;
  1559. node.a('node.width', width);
  1560. setWidth.apply(this, arguments);
  1561. resetPoints(rx, 1);
  1562. }
  1563. node.setHeight = function (height) {
  1564. var _height = this.getHeight();
  1565. ry = height / _height;
  1566. node.a('node.height', height);
  1567. setHeight.apply(this, arguments);
  1568. resetPoints(1, ry);
  1569. }
  1570. })(Lib_12345Node12_3, Lib_12345Node12_3compsPoints, Lib_12345Node12_3SetPoints );
  1571. var Lib_12345Node12_4points=[72, 56,80, 56],
  1572. Lib_12345Node12_4rect=ht.Default.unionPoint([{x:72,y:56},{x:80,y:56}]),
  1573. Lib_12345Node12_4compspts=[];
  1574. _ratio = GD.getRatioWithRotation(0, ratio);
  1575. var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
  1576. _endratio = GD.getRatioWithRotation(0, ratio);
  1577. for(var i=0;i<Lib_12345Node12_4points.length;i++){
  1578. if(i%2==0){
  1579. Lib_12345Node12_4compspts.push(Lib_12345Node12_4points[i]-Lib_12345Node12_4rect.x);
  1580. }else{
  1581. Lib_12345Node12_4compspts.push(Lib_12345Node12_4points[i]-Lib_12345Node12_4rect.y);
  1582. }
  1583. }
  1584. var Lib_12345Node12_4ptslength=Lib_12345Node12_4compspts.length;
  1585. if (Lib_12345Node12_4rect.height === 0) {
  1586. Lib_12345Node12_4compspts[0] -= 0;
  1587. Lib_12345Node12_4compspts[Lib_12345Node12_4ptslength-2] += 0;
  1588. } else if (Lib_12345Node12_4rect.width === 0){
  1589. Lib_12345Node12_4compspts[1] -= 0;
  1590. Lib_12345Node12_4compspts[Lib_12345Node12_4ptslength-1] += 0;
  1591. } else {
  1592. Lib_12345Node12_4compspts[0] -= 0;
  1593. Lib_12345Node12_4compspts[1] -= 0;
  1594. Lib_12345Node12_4compspts[Lib_12345Node12_4ptslength-2] += 0;
  1595. Lib_12345Node12_4compspts[Lib_12345Node12_4ptslength-1] += 0;
  1596. }
  1597. Lib_12345Node12_4 = new ht.Node();
  1598. Lib_12345Node12_4.borderWidth = 1;
  1599. Lib_12345Node12_4rect.width = Lib_12345Node12_4rect.width === 0 ? 0.0001 : Lib_12345Node12_4rect.width;
  1600. Lib_12345Node12_4rect.height = Lib_12345Node12_4rect.height === 0 ? 0.0001 : Lib_12345Node12_4rect.height;
  1601. var Lib_12345Node12_4endCompspts = [Lib_12345Node12_4compspts[Lib_12345Node12_4ptslength-2],Lib_12345Node12_4compspts[Lib_12345Node12_4ptslength-1],0,0];
  1602. var Lib_12345Node12_4startCompspts = [Lib_12345Node12_4compspts[0],Lib_12345Node12_4compspts[1],0,0];
  1603. Lib_12345Node12_4.setImage(GD.getPolyLineJSON());
  1604. Lib_12345Node12_4.setPosition(Lib_12345Node12_4rect.x+Lib_12345Node12_4rect.width/2,Lib_12345Node12_4rect.y+Lib_12345Node12_4rect.height/2);
  1605. Lib_12345Node12_4.setSize(Lib_12345Node12_4rect.width,Lib_12345Node12_4rect.height);
  1606. Lib_12345Node12_4.setStyle("opacity",1);
  1607. Lib_12345Node12_4.s({'pixelPerfect':true});
  1608. Lib_12345Node12_4borderwidth=1;
  1609. Lib_12345Node12_4.setRotation(0);
  1610. dataModel.add(Lib_12345Node12_4);
  1611. Lib_12345Node12_4.a('node.points',Lib_12345Node12_4compspts);
  1612. Lib_12345Node12_4.a('node.segments',[1,2]);
  1613. Lib_12345Node12_4.a('node.color','rgba(255,128,0,1)');
  1614. Lib_12345Node12_4.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1615. Lib_12345Node12_4.a('node.borderColor','rgba(255,128,0,1)');
  1616. Lib_12345Node12_4.a('node.background','rgba(255,128,0,1)');
  1617. Lib_12345Node12_4.a('node.gradient','');
  1618. Lib_12345Node12_4.a('node.gradientcolor','rgba(255,128,0,1)');
  1619. Lib_12345Node12_4.a('node.endCompspts',Lib_12345Node12_4endCompspts);
  1620. Lib_12345Node12_4.a('node.startCompspts',Lib_12345Node12_4startCompspts);
  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 = 1;
  1654. node.a('node.borderwidth',node.borderWidth);
  1655. node._nodename = 'Lib_12345Node12_4';
  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_12345Node12_4, Lib_12345Node12_4.getImage(), Lib_12345Node12_4compspts, Lib_12345Node12_4endCompspts, Lib_12345Node12_4startCompspts);
  1679. var Lib_12345Node12_5points=[68, 53,83, 53],
  1680. Lib_12345Node12_5rect=ht.Default.unionPoint([{x:68,y:53},{x:83,y:53}]),
  1681. Lib_12345Node12_5compspts=[];
  1682. _ratio = GD.getRatioWithRotation(0, ratio);
  1683. var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
  1684. _endratio = GD.getRatioWithRotation(0, ratio);
  1685. for(var i=0;i<Lib_12345Node12_5points.length;i++){
  1686. if(i%2==0){
  1687. Lib_12345Node12_5compspts.push(Lib_12345Node12_5points[i]-Lib_12345Node12_5rect.x);
  1688. }else{
  1689. Lib_12345Node12_5compspts.push(Lib_12345Node12_5points[i]-Lib_12345Node12_5rect.y);
  1690. }
  1691. }
  1692. var Lib_12345Node12_5ptslength=Lib_12345Node12_5compspts.length;
  1693. if (Lib_12345Node12_5rect.height === 0) {
  1694. Lib_12345Node12_5compspts[0] -= 0;
  1695. Lib_12345Node12_5compspts[Lib_12345Node12_5ptslength-2] += 0;
  1696. } else if (Lib_12345Node12_5rect.width === 0){
  1697. Lib_12345Node12_5compspts[1] -= 0;
  1698. Lib_12345Node12_5compspts[Lib_12345Node12_5ptslength-1] += 0;
  1699. } else {
  1700. Lib_12345Node12_5compspts[0] -= 0;
  1701. Lib_12345Node12_5compspts[1] -= 0;
  1702. Lib_12345Node12_5compspts[Lib_12345Node12_5ptslength-2] += 0;
  1703. Lib_12345Node12_5compspts[Lib_12345Node12_5ptslength-1] += 0;
  1704. }
  1705. Lib_12345Node12_5 = new ht.Node();
  1706. Lib_12345Node12_5.borderWidth = 1;
  1707. Lib_12345Node12_5rect.width = Lib_12345Node12_5rect.width === 0 ? 0.0001 : Lib_12345Node12_5rect.width;
  1708. Lib_12345Node12_5rect.height = Lib_12345Node12_5rect.height === 0 ? 0.0001 : Lib_12345Node12_5rect.height;
  1709. var Lib_12345Node12_5endCompspts = [Lib_12345Node12_5compspts[Lib_12345Node12_5ptslength-2],Lib_12345Node12_5compspts[Lib_12345Node12_5ptslength-1],0,0];
  1710. var Lib_12345Node12_5startCompspts = [Lib_12345Node12_5compspts[0],Lib_12345Node12_5compspts[1],0,0];
  1711. Lib_12345Node12_5.setImage(GD.getPolyLineJSON());
  1712. Lib_12345Node12_5.setPosition(Lib_12345Node12_5rect.x+Lib_12345Node12_5rect.width/2,Lib_12345Node12_5rect.y+Lib_12345Node12_5rect.height/2);
  1713. Lib_12345Node12_5.setSize(Lib_12345Node12_5rect.width,Lib_12345Node12_5rect.height);
  1714. Lib_12345Node12_5.setStyle("opacity",1);
  1715. Lib_12345Node12_5.s({'pixelPerfect':true});
  1716. Lib_12345Node12_5borderwidth=1;
  1717. Lib_12345Node12_5.setRotation(0);
  1718. dataModel.add(Lib_12345Node12_5);
  1719. Lib_12345Node12_5.a('node.points',Lib_12345Node12_5compspts);
  1720. Lib_12345Node12_5.a('node.segments',[1,2]);
  1721. Lib_12345Node12_5.a('node.color','rgba(255,128,0,1)');
  1722. Lib_12345Node12_5.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1723. Lib_12345Node12_5.a('node.borderColor','rgba(255,128,0,1)');
  1724. Lib_12345Node12_5.a('node.background','rgba(255,128,0,1)');
  1725. Lib_12345Node12_5.a('node.gradient','');
  1726. Lib_12345Node12_5.a('node.gradientcolor','rgba(255,128,0,1)');
  1727. Lib_12345Node12_5.a('node.endCompspts',Lib_12345Node12_5endCompspts);
  1728. Lib_12345Node12_5.a('node.startCompspts',Lib_12345Node12_5startCompspts);
  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 = 1;
  1762. node.a('node.borderwidth',node.borderWidth);
  1763. node._nodename = 'Lib_12345Node12_5';
  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_12345Node12_5, Lib_12345Node12_5.getImage(), Lib_12345Node12_5compspts, Lib_12345Node12_5endCompspts, Lib_12345Node12_5startCompspts);
  1787. var Lib_12345Node12_6points=[67, 50,86, 50],
  1788. Lib_12345Node12_6rect=ht.Default.unionPoint([{x:67,y:50},{x:86,y:50}]),
  1789. Lib_12345Node12_6compspts=[];
  1790. _ratio = GD.getRatioWithRotation(0, ratio);
  1791. var _startratio = GD.getRatioWithRotation(3.14159265358979, ratio),
  1792. _endratio = GD.getRatioWithRotation(0, ratio);
  1793. for(var i=0;i<Lib_12345Node12_6points.length;i++){
  1794. if(i%2==0){
  1795. Lib_12345Node12_6compspts.push(Lib_12345Node12_6points[i]-Lib_12345Node12_6rect.x);
  1796. }else{
  1797. Lib_12345Node12_6compspts.push(Lib_12345Node12_6points[i]-Lib_12345Node12_6rect.y);
  1798. }
  1799. }
  1800. var Lib_12345Node12_6ptslength=Lib_12345Node12_6compspts.length;
  1801. if (Lib_12345Node12_6rect.height === 0) {
  1802. Lib_12345Node12_6compspts[0] -= 0;
  1803. Lib_12345Node12_6compspts[Lib_12345Node12_6ptslength-2] += 0;
  1804. } else if (Lib_12345Node12_6rect.width === 0){
  1805. Lib_12345Node12_6compspts[1] -= 0;
  1806. Lib_12345Node12_6compspts[Lib_12345Node12_6ptslength-1] += 0;
  1807. } else {
  1808. Lib_12345Node12_6compspts[0] -= 0;
  1809. Lib_12345Node12_6compspts[1] -= 0;
  1810. Lib_12345Node12_6compspts[Lib_12345Node12_6ptslength-2] += 0;
  1811. Lib_12345Node12_6compspts[Lib_12345Node12_6ptslength-1] += 0;
  1812. }
  1813. Lib_12345Node12_6 = new ht.Node();
  1814. Lib_12345Node12_6.borderWidth = 1;
  1815. Lib_12345Node12_6rect.width = Lib_12345Node12_6rect.width === 0 ? 0.0001 : Lib_12345Node12_6rect.width;
  1816. Lib_12345Node12_6rect.height = Lib_12345Node12_6rect.height === 0 ? 0.0001 : Lib_12345Node12_6rect.height;
  1817. var Lib_12345Node12_6endCompspts = [Lib_12345Node12_6compspts[Lib_12345Node12_6ptslength-2],Lib_12345Node12_6compspts[Lib_12345Node12_6ptslength-1],0,0];
  1818. var Lib_12345Node12_6startCompspts = [Lib_12345Node12_6compspts[0],Lib_12345Node12_6compspts[1],0,0];
  1819. Lib_12345Node12_6.setImage(GD.getPolyLineJSON());
  1820. Lib_12345Node12_6.setPosition(Lib_12345Node12_6rect.x+Lib_12345Node12_6rect.width/2,Lib_12345Node12_6rect.y+Lib_12345Node12_6rect.height/2);
  1821. Lib_12345Node12_6.setSize(Lib_12345Node12_6rect.width,Lib_12345Node12_6rect.height);
  1822. Lib_12345Node12_6.setStyle("opacity",1);
  1823. Lib_12345Node12_6.s({'pixelPerfect':true});
  1824. Lib_12345Node12_6borderwidth=1;
  1825. Lib_12345Node12_6.setRotation(0);
  1826. dataModel.add(Lib_12345Node12_6);
  1827. Lib_12345Node12_6.a('node.points',Lib_12345Node12_6compspts);
  1828. Lib_12345Node12_6.a('node.segments',[1,2]);
  1829. Lib_12345Node12_6.a('node.color','rgba(255,128,0,1)');
  1830. Lib_12345Node12_6.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1831. Lib_12345Node12_6.a('node.borderColor','rgba(255,128,0,1)');
  1832. Lib_12345Node12_6.a('node.background','rgba(255,128,0,1)');
  1833. Lib_12345Node12_6.a('node.gradient','');
  1834. Lib_12345Node12_6.a('node.gradientcolor','rgba(255,128,0,1)');
  1835. Lib_12345Node12_6.a('node.endCompspts',Lib_12345Node12_6endCompspts);
  1836. Lib_12345Node12_6.a('node.startCompspts',Lib_12345Node12_6startCompspts);
  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 = 1;
  1870. node.a('node.borderwidth',node.borderWidth);
  1871. node._nodename = 'Lib_12345Node12_6';
  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_12345Node12_6, Lib_12345Node12_6.getImage(), Lib_12345Node12_6compspts, Lib_12345Node12_6endCompspts, Lib_12345Node12_6startCompspts);
  1895. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  1896. var Lib_12345Node12boundtype = 'rect';
  1897. var Lib_12345Node12bound = new ht.Node(),
  1898. Lib_12345Node12boundBorderWidth = 0*2;
  1899. if (Lib_12345Node12boundtype === 'arc') {
  1900. Lib_12345Node12boundBorderWidth *= 0;
  1901. }
  1902. Lib_12345Node12bound.setImage(GD.getRectJSON(19.12164*_ratio.ratioX, 55.61331*_ratio.ratioY, Lib_12345Node12boundtype, '@arcFrom@', '@arcTo@', '@arcClose@'));
  1903. Lib_12345Node12bound.setPosition(76*ratio.ratioX, 28*ratio.ratioY);
  1904. Lib_12345Node12bound.setSize(19.12164*_ratio.ratioX, 55.61331*_ratio.ratioY);
  1905. Lib_12345Node12bound.s({
  1906. 'pixelPerfect':true
  1907. /*@AddPara@*/
  1908. });
  1909. Lib_12345Node12bound.a('node.width', 19.12164*_ratio.ratioX);
  1910. Lib_12345Node12bound.a('node.height', 55.61331*_ratio.ratioY);
  1911. Lib_12345Node12bound.a('node.type', Lib_12345Node12boundtype);
  1912. Lib_12345Node12bound.a('node.rect', [0, 0, 19.12164*_ratio.ratioX, 55.61331*_ratio.ratioY]);
  1913. Lib_12345Node12bound.a('node.background', 'rgba(255,255,255,0.003921569)');
  1914. Lib_12345Node12bound.a('node.gradientcolor', '');
  1915. Lib_12345Node12bound.a('node.gradient', '');
  1916. Lib_12345Node12bound.a('node.borderwidth', Lib_12345Node12boundBorderWidth);
  1917. Lib_12345Node12bound.a('node.color', 'rgba(0,0,0,1)');
  1918. Lib_12345Node12bound.a('node.fillrect', [0,0,0,0]);
  1919. Lib_12345Node12bound.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  1920. Lib_12345Node12bound.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  1921. Lib_12345Node12bound.a('node.fillgradient', '');
  1922. if (Lib_12345Node12boundtype !== 'rect') {
  1923. Lib_12345Node12bound.a('node.arcFrom', parseFloat('@arcFrom@'));
  1924. Lib_12345Node12bound.a('node.arcTo', parseFloat('@arcTo@'));
  1925. Lib_12345Node12bound.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  1926. }
  1927. if (Lib_12345Node12boundtype === 'arc') {
  1928. Lib_12345Node12bound.a('node.arcOval', true);
  1929. }
  1930. Lib_12345Node12bound.setRotation(0*Math.PI/180);
  1931. Lib_12345Node12bound.borderWidth = Lib_12345Node12boundBorderWidth;
  1932. Lib_12345Node12bound.borderFillwidth = Lib_12345Node12boundBorderWidth;
  1933. dataModel.add(Lib_12345Node12bound);
  1934. Lib_12345Node12bound._nodename = 'Lib_12345Node12bound'
  1935. Lib_12345Node12bound._nodeType = 'rect';
  1936. zoomNodeList.push({
  1937. node: Lib_12345Node12bound,
  1938. attr: 'node.borderwidth'
  1939. });
  1940. (function (node, _img) {
  1941. var setWidth = node.setWidth,
  1942. setHeight = node.setHeight;
  1943. node.setWidth = function (width) {
  1944. if (width === this.getWidth()) return ;
  1945. var height = this.getHeight();
  1946. this.a('node.width', width);
  1947. this.a('node.rect', [0,0,width, height]);
  1948. setWidth.apply(this, arguments);
  1949. }
  1950. node.setHeight = function (height) {
  1951. if (height === this.getHeight()) return ;
  1952. var width = this.getWidth();
  1953. this.a('node.height', height);
  1954. this.a('node.rect', [0,0,width, height]);
  1955. setHeight.apply(this, arguments);
  1956. }
  1957. })(Lib_12345Node12bound, Lib_12345Node12bound.getImage());
  1958. /*@GraphList@*/
  1959. GD.groupRotat(Lib_12345Node12bound, Lib_12345Node12_0, (180 )*Math.PI/180, ratio);
  1960. GD.groupRotat(Lib_12345Node12bound, Lib_12345Node12_1, (180 )*Math.PI/180, ratio);
  1961. GD.groupRotat(Lib_12345Node12bound, Lib_12345Node12_2, (180 )*Math.PI/180, ratio);
  1962. GD.groupRotat(Lib_12345Node12bound, Lib_12345Node12_3, (180 )*Math.PI/180, ratio);
  1963. GD.groupRotat(Lib_12345Node12bound, Lib_12345Node12_4, (180 )*Math.PI/180, ratio);
  1964. GD.groupRotat(Lib_12345Node12bound, Lib_12345Node12_5, (180 )*Math.PI/180, ratio);
  1965. GD.groupRotat(Lib_12345Node12bound, Lib_12345Node12_6, (180 )*Math.PI/180, ratio);
  1966. /*@PageInit@*/
  1967. var localVarObj = this.localVarObj;
  1968. var localDynamicVarObj = this.localDynamicVar();
  1969. this['Lib_12345Node0'] = Lib_12345Node0;
  1970. Lib_12345Node0.__parentLib = nodename;
  1971. Lib_12345Node0.__parent = this;
  1972. this.childNodes.push(Lib_12345Node0);
  1973. this['Lib_12345Node1'] = Lib_12345Node1;
  1974. Lib_12345Node1.__parentLib = nodename;
  1975. Lib_12345Node1.__parent = this;
  1976. this.childNodes.push(Lib_12345Node1);
  1977. this['Lib_12345Node2'] = Lib_12345Node2;
  1978. Lib_12345Node2.__parentLib = nodename;
  1979. Lib_12345Node2.__parent = this;
  1980. this.childNodes.push(Lib_12345Node2);
  1981. this['Lib_12345Node3'] = Lib_12345Node3;
  1982. Lib_12345Node3.__parentLib = nodename;
  1983. Lib_12345Node3.__parent = this;
  1984. this.childNodes.push(Lib_12345Node3);
  1985. this['Lib_12345Node4'] = Lib_12345Node4;
  1986. Lib_12345Node4.__parentLib = nodename;
  1987. Lib_12345Node4.__parent = this;
  1988. this.childNodes.push(Lib_12345Node4);
  1989. this['Lib_12345Node5'] = Lib_12345Node5;
  1990. Lib_12345Node5.__parentLib = nodename;
  1991. Lib_12345Node5.__parent = this;
  1992. this.childNodes.push(Lib_12345Node5);
  1993. this['Lib_12345Node6'] = Lib_12345Node6;
  1994. Lib_12345Node6.__parentLib = nodename;
  1995. Lib_12345Node6.__parent = this;
  1996. this.childNodes.push(Lib_12345Node6);
  1997. this['Lib_12345Node7'] = Lib_12345Node7;
  1998. Lib_12345Node7.__parentLib = nodename;
  1999. Lib_12345Node7.__parent = this;
  2000. this.childNodes.push(Lib_12345Node7);
  2001. this['Lib_12345Node8'] = Lib_12345Node8;
  2002. Lib_12345Node8.__parentLib = nodename;
  2003. Lib_12345Node8.__parent = this;
  2004. this.childNodes.push(Lib_12345Node8);
  2005. this['Lib_12345Node9'] = Lib_12345Node9;
  2006. Lib_12345Node9.__parentLib = nodename;
  2007. Lib_12345Node9.__parent = this;
  2008. this.childNodes.push(Lib_12345Node9);
  2009. this['Lib_12345Node10'] = Lib_12345Node10;
  2010. Lib_12345Node10.__parentLib = nodename;
  2011. Lib_12345Node10.__parent = this;
  2012. this.childNodes.push(Lib_12345Node10);
  2013. this['Lib_12345Node11'] = Lib_12345Node11;
  2014. Lib_12345Node11.__parentLib = nodename;
  2015. Lib_12345Node11.__parent = this;
  2016. this.childNodes.push(Lib_12345Node11);
  2017. this['Lib_12345Node12_0'] = Lib_12345Node12_0;
  2018. Lib_12345Node12_0.__parentLib = nodename;
  2019. Lib_12345Node12_0.__parent = this;
  2020. this.childNodes.push(Lib_12345Node12_0);
  2021. this['Lib_12345Node12_1'] = Lib_12345Node12_1;
  2022. Lib_12345Node12_1.__parentLib = nodename;
  2023. Lib_12345Node12_1.__parent = this;
  2024. this.childNodes.push(Lib_12345Node12_1);
  2025. this['Lib_12345Node12_2'] = Lib_12345Node12_2;
  2026. Lib_12345Node12_2.__parentLib = nodename;
  2027. Lib_12345Node12_2.__parent = this;
  2028. this.childNodes.push(Lib_12345Node12_2);
  2029. this['Lib_12345Node12_3'] = Lib_12345Node12_3;
  2030. Lib_12345Node12_3.__parentLib = nodename;
  2031. Lib_12345Node12_3.__parent = this;
  2032. this.childNodes.push(Lib_12345Node12_3);
  2033. this['Lib_12345Node12_4'] = Lib_12345Node12_4;
  2034. Lib_12345Node12_4.__parentLib = nodename;
  2035. Lib_12345Node12_4.__parent = this;
  2036. this.childNodes.push(Lib_12345Node12_4);
  2037. this['Lib_12345Node12_5'] = Lib_12345Node12_5;
  2038. Lib_12345Node12_5.__parentLib = nodename;
  2039. Lib_12345Node12_5.__parent = this;
  2040. this.childNodes.push(Lib_12345Node12_5);
  2041. this['Lib_12345Node12_6'] = Lib_12345Node12_6;
  2042. Lib_12345Node12_6.__parentLib = nodename;
  2043. Lib_12345Node12_6.__parent = this;
  2044. this.childNodes.push(Lib_12345Node12_6);
  2045. this['Lib_12345Node12bound'] = Lib_12345Node12bound;
  2046. Lib_12345Node12bound.__parentLib = nodename;
  2047. Lib_12345Node12bound.__parent = this;
  2048. this.childNodes.push(Lib_12345Node12bound);
  2049. /*@ControlContextMenu@*/
  2050. /*@Declare@*/
  2051. this.init(x, y, width, height, angle);
  2052. };
  2053. ht.Default.def('ht.lib.12345', Object, {
  2054. refresh10ms: function () {
  2055. var localVarObj = this.localVarObj;
  2056. var localDynamicVarObj = this.localDynamicVar();
  2057. var Lib_12345Node0= this.Lib_12345Node0;
  2058. var Lib_12345Node1= this.Lib_12345Node1;
  2059. var Lib_12345Node2= this.Lib_12345Node2;
  2060. var Lib_12345Node3= this.Lib_12345Node3;
  2061. var Lib_12345Node4= this.Lib_12345Node4;
  2062. var Lib_12345Node5= this.Lib_12345Node5;
  2063. var Lib_12345Node6= this.Lib_12345Node6;
  2064. var Lib_12345Node7= this.Lib_12345Node7;
  2065. var Lib_12345Node8= this.Lib_12345Node8;
  2066. var Lib_12345Node9= this.Lib_12345Node9;
  2067. var Lib_12345Node10= this.Lib_12345Node10;
  2068. var Lib_12345Node11= this.Lib_12345Node11;
  2069. var Lib_12345Node12_0= this.Lib_12345Node12_0;
  2070. var Lib_12345Node12_1= this.Lib_12345Node12_1;
  2071. var Lib_12345Node12_2= this.Lib_12345Node12_2;
  2072. var Lib_12345Node12_3= this.Lib_12345Node12_3;
  2073. var Lib_12345Node12_4= this.Lib_12345Node12_4;
  2074. var Lib_12345Node12_5= this.Lib_12345Node12_5;
  2075. var Lib_12345Node12_6= this.Lib_12345Node12_6;
  2076. var Lib_12345Node12bound= this.Lib_12345Node12bound;
  2077. /*@refresh10ms@*/
  2078. },
  2079. refresh100ms: function () {
  2080. var localVarObj = this.localVarObj;
  2081. var localDynamicVarObj = this.localDynamicVar();
  2082. var Lib_12345Node0= this.Lib_12345Node0;
  2083. var Lib_12345Node1= this.Lib_12345Node1;
  2084. var Lib_12345Node2= this.Lib_12345Node2;
  2085. var Lib_12345Node3= this.Lib_12345Node3;
  2086. var Lib_12345Node4= this.Lib_12345Node4;
  2087. var Lib_12345Node5= this.Lib_12345Node5;
  2088. var Lib_12345Node6= this.Lib_12345Node6;
  2089. var Lib_12345Node7= this.Lib_12345Node7;
  2090. var Lib_12345Node8= this.Lib_12345Node8;
  2091. var Lib_12345Node9= this.Lib_12345Node9;
  2092. var Lib_12345Node10= this.Lib_12345Node10;
  2093. var Lib_12345Node11= this.Lib_12345Node11;
  2094. var Lib_12345Node12_0= this.Lib_12345Node12_0;
  2095. var Lib_12345Node12_1= this.Lib_12345Node12_1;
  2096. var Lib_12345Node12_2= this.Lib_12345Node12_2;
  2097. var Lib_12345Node12_3= this.Lib_12345Node12_3;
  2098. var Lib_12345Node12_4= this.Lib_12345Node12_4;
  2099. var Lib_12345Node12_5= this.Lib_12345Node12_5;
  2100. var Lib_12345Node12_6= this.Lib_12345Node12_6;
  2101. var Lib_12345Node12bound= this.Lib_12345Node12bound;
  2102. /*@refresh100ms@*/
  2103. },
  2104. refresh500ms: function () {
  2105. var localVarObj = this.localVarObj;
  2106. var localDynamicVarObj = this.localDynamicVar();
  2107. var Lib_12345Node0= this.Lib_12345Node0;
  2108. var Lib_12345Node1= this.Lib_12345Node1;
  2109. var Lib_12345Node2= this.Lib_12345Node2;
  2110. var Lib_12345Node3= this.Lib_12345Node3;
  2111. var Lib_12345Node4= this.Lib_12345Node4;
  2112. var Lib_12345Node5= this.Lib_12345Node5;
  2113. var Lib_12345Node6= this.Lib_12345Node6;
  2114. var Lib_12345Node7= this.Lib_12345Node7;
  2115. var Lib_12345Node8= this.Lib_12345Node8;
  2116. var Lib_12345Node9= this.Lib_12345Node9;
  2117. var Lib_12345Node10= this.Lib_12345Node10;
  2118. var Lib_12345Node11= this.Lib_12345Node11;
  2119. var Lib_12345Node12_0= this.Lib_12345Node12_0;
  2120. var Lib_12345Node12_1= this.Lib_12345Node12_1;
  2121. var Lib_12345Node12_2= this.Lib_12345Node12_2;
  2122. var Lib_12345Node12_3= this.Lib_12345Node12_3;
  2123. var Lib_12345Node12_4= this.Lib_12345Node12_4;
  2124. var Lib_12345Node12_5= this.Lib_12345Node12_5;
  2125. var Lib_12345Node12_6= this.Lib_12345Node12_6;
  2126. var Lib_12345Node12bound= this.Lib_12345Node12bound;
  2127. /*@refresh500ms@*/
  2128. },
  2129. refresh1s: function () {
  2130. var Counter1s = arguments[0] || 0;
  2131. var localVarObj = this.localVarObj;
  2132. var localDynamicVarObj = this.localDynamicVar();
  2133. var Lib_12345Node0= this.Lib_12345Node0;
  2134. var Lib_12345Node1= this.Lib_12345Node1;
  2135. var Lib_12345Node2= this.Lib_12345Node2;
  2136. var Lib_12345Node3= this.Lib_12345Node3;
  2137. var Lib_12345Node4= this.Lib_12345Node4;
  2138. var Lib_12345Node5= this.Lib_12345Node5;
  2139. var Lib_12345Node6= this.Lib_12345Node6;
  2140. var Lib_12345Node7= this.Lib_12345Node7;
  2141. var Lib_12345Node8= this.Lib_12345Node8;
  2142. var Lib_12345Node9= this.Lib_12345Node9;
  2143. var Lib_12345Node10= this.Lib_12345Node10;
  2144. var Lib_12345Node11= this.Lib_12345Node11;
  2145. var Lib_12345Node12_0= this.Lib_12345Node12_0;
  2146. var Lib_12345Node12_1= this.Lib_12345Node12_1;
  2147. var Lib_12345Node12_2= this.Lib_12345Node12_2;
  2148. var Lib_12345Node12_3= this.Lib_12345Node12_3;
  2149. var Lib_12345Node12_4= this.Lib_12345Node12_4;
  2150. var Lib_12345Node12_5= this.Lib_12345Node12_5;
  2151. var Lib_12345Node12_6= this.Lib_12345Node12_6;
  2152. var Lib_12345Node12bound= this.Lib_12345Node12bound;
  2153. /*@refresh1s@*/
  2154. },
  2155. refresh5s: function () {
  2156. var localVarObj = this.localVarObj;
  2157. var localDynamicVarObj = this.localDynamicVar();
  2158. var Lib_12345Node0= this.Lib_12345Node0;
  2159. var Lib_12345Node1= this.Lib_12345Node1;
  2160. var Lib_12345Node2= this.Lib_12345Node2;
  2161. var Lib_12345Node3= this.Lib_12345Node3;
  2162. var Lib_12345Node4= this.Lib_12345Node4;
  2163. var Lib_12345Node5= this.Lib_12345Node5;
  2164. var Lib_12345Node6= this.Lib_12345Node6;
  2165. var Lib_12345Node7= this.Lib_12345Node7;
  2166. var Lib_12345Node8= this.Lib_12345Node8;
  2167. var Lib_12345Node9= this.Lib_12345Node9;
  2168. var Lib_12345Node10= this.Lib_12345Node10;
  2169. var Lib_12345Node11= this.Lib_12345Node11;
  2170. var Lib_12345Node12_0= this.Lib_12345Node12_0;
  2171. var Lib_12345Node12_1= this.Lib_12345Node12_1;
  2172. var Lib_12345Node12_2= this.Lib_12345Node12_2;
  2173. var Lib_12345Node12_3= this.Lib_12345Node12_3;
  2174. var Lib_12345Node12_4= this.Lib_12345Node12_4;
  2175. var Lib_12345Node12_5= this.Lib_12345Node12_5;
  2176. var Lib_12345Node12_6= this.Lib_12345Node12_6;
  2177. var Lib_12345Node12bound= this.Lib_12345Node12bound;
  2178. /*@refresh5s@*/
  2179. },
  2180. /*@PageDynamic@*/
  2181. onEvent: function (e, data, type, origin, offset, objMouseOn, ctm) {
  2182. var localVarObj = this.localVarObj;
  2183. var localDynamicVarObj = this.localDynamicVar();
  2184. var Lib_12345Node0= this.Lib_12345Node0;
  2185. var Lib_12345Node1= this.Lib_12345Node1;
  2186. var Lib_12345Node2= this.Lib_12345Node2;
  2187. var Lib_12345Node3= this.Lib_12345Node3;
  2188. var Lib_12345Node4= this.Lib_12345Node4;
  2189. var Lib_12345Node5= this.Lib_12345Node5;
  2190. var Lib_12345Node6= this.Lib_12345Node6;
  2191. var Lib_12345Node7= this.Lib_12345Node7;
  2192. var Lib_12345Node8= this.Lib_12345Node8;
  2193. var Lib_12345Node9= this.Lib_12345Node9;
  2194. var Lib_12345Node10= this.Lib_12345Node10;
  2195. var Lib_12345Node11= this.Lib_12345Node11;
  2196. var Lib_12345Node12_0= this.Lib_12345Node12_0;
  2197. var Lib_12345Node12_1= this.Lib_12345Node12_1;
  2198. var Lib_12345Node12_2= this.Lib_12345Node12_2;
  2199. var Lib_12345Node12_3= this.Lib_12345Node12_3;
  2200. var Lib_12345Node12_4= this.Lib_12345Node12_4;
  2201. var Lib_12345Node12_5= this.Lib_12345Node12_5;
  2202. var Lib_12345Node12_6= this.Lib_12345Node12_6;
  2203. var Lib_12345Node12bound= this.Lib_12345Node12bound;
  2204. if (type === 'click') {
  2205. /*@EvnentClicked@*/
  2206. } else if (type === 'mousedown') {
  2207. mouseX=e.clientX;
  2208. mouseY=e.clientY;
  2209. /*@EvnentMouseDown@*/
  2210. } else if (type === 'mouseup') {
  2211. /*@EvnentMouseUp@*/
  2212. } else if (type === 'mousemove') {
  2213. var mouseX, mouseY, position, zoom;
  2214. position=origin.getLogicalPoint(e);
  2215. zoom = graphView.getZoom();
  2216. if (origin === graphView) {
  2217. mouseX= position.x + origin.tx();
  2218. mouseY = position.y + origin.ty();
  2219. } else {
  2220. offset = offset || {x: 0, y: 0};
  2221. mouseX = position.x / zoom + offset.x + origin.tx();
  2222. mouseY = position.y / zoom + offset.y + origin.ty();
  2223. }
  2224. /*@EvnentMouseLeave@*/
  2225. /*@EvnentMouseOver@*/
  2226. } else if (type === 'keydown') {
  2227. /*@EvnentKeyDown@*/
  2228. } else if (type === 'contextmenu') {
  2229. /*@Declare@*/
  2230. /*@SetNodeContextMenu@*/
  2231. /*@SetPageContextMenu@*/
  2232. }
  2233. /*@LibEvent@*/
  2234. },
  2235. getBaseClass: function () {
  2236. return this._baseClass;
  2237. },
  2238. getWidth: function () {
  2239. return this._width;
  2240. },
  2241. getHeight: function () {
  2242. return this._height;
  2243. },
  2244. getSize: function () {
  2245. return {
  2246. width: this._width,
  2247. height: this._height
  2248. }
  2249. },
  2250. setWidth: function (width) {
  2251. if (width === undefined || width === null || width != width) {
  2252. return ;
  2253. }
  2254. var originWidth = this._width;
  2255. var ratio = width / originWidth;
  2256. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), w, cw, ox, rotation = this.getRotation();
  2257. for (var i = 0, len = childNodes.length; i < len; i++) {
  2258. childNode = childNodes[i];
  2259. p = childNode.getPosition();
  2260. cw = childNode.getWidth();
  2261. w = cw >=2 ? cw * ratio : cw;
  2262. childNode.setWidth(w);
  2263. ox = op.x + (p.x - op.x) * ratio;
  2264. childNode.setPosition(ox, p.y);
  2265. rotation = GD.calcRotation(rotation);
  2266. if (rotation === 0 || rotation === Math.PI) {
  2267. // 图元未旋转
  2268. ox = op.x + (p.x - op.x)*ratio;
  2269. childNode.setPosition(ox, p.y);
  2270. } else if (rotation === 90 * Math.PI / 180) {
  2271. // 图元旋转以后
  2272. ox = op.y + (p.y - op.y)*ratio;
  2273. childNode.setPosition(p.x, ox);
  2274. }
  2275. }
  2276. this._width = width;
  2277. this._originWidth = width;
  2278. this._ratioX = ratio;
  2279. return this;
  2280. },
  2281. setHeight: function (height) {
  2282. if (height === undefined || height === null || height != height) {
  2283. return ;
  2284. }
  2285. var originHeight = this._height;
  2286. var ratio = height / originHeight;
  2287. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), h, ch, oy, rotation = this.getRotation();
  2288. for (var i = 0, len = childNodes.length; i < len; i++) {
  2289. childNode = childNodes[i];
  2290. p = childNode.getPosition();
  2291. ch = childNode.getHeight();
  2292. h = ch >=2 ? ch * ratio : ch;
  2293. childNode.setHeight(h);
  2294. rotation = GD.calcRotation(rotation);
  2295. if (rotation === 0 || rotation === Math.PI) {
  2296. // 图元未旋转
  2297. oy = op.y + (p.y - op.y)*ratio;
  2298. childNode.setPosition(p.x, oy);
  2299. } else if (rotation === 90 * Math.PI / 180) {
  2300. // 图元旋转以后
  2301. oy = op.x + (p.x - op.x)*ratio;
  2302. childNode.setPosition(oy, p.y);
  2303. }
  2304. }
  2305. this._height = height;
  2306. this._originHeight = height;
  2307. this._ratioY = ratio;
  2308. return this;
  2309. },
  2310. setSize: function (size) {
  2311. // var args = Array.prototype.slice.call(arguments, 0);
  2312. // var height, width;
  2313. // if (args.length === 0) {
  2314. // return ;
  2315. // }else if (args.length === 1) {
  2316. // height = args[0].height;
  2317. // width = args[0].width;
  2318. // } else {
  2319. // width = args[0];
  2320. // height = args[1];
  2321. // }
  2322. // var wh = GD.getRatioWithRotation(angle, wid)
  2323. // this.setHeight(height);
  2324. // this.setWidth(width);
  2325. // return this;
  2326. var args = Array.prototype.slice.call(arguments, 0);
  2327. var height, width;
  2328. if (args.length === 0) {
  2329. return ;
  2330. }else if (args.length === 1) {
  2331. height = args[0].height;
  2332. width = args[0].width;
  2333. angle = 0;
  2334. } else if (args.length === 2) {
  2335. if (typeof args[0] === 'object') {
  2336. width = args[0].width;
  2337. height = args[0].height;
  2338. angle = args[1] || 0;
  2339. } else {
  2340. width = args[0];
  2341. height = args[1];
  2342. angle = 0;
  2343. }
  2344. } else if (args.length === 3) {
  2345. width = args[0];
  2346. height = args[1];
  2347. angle = args[2] || 0;
  2348. }
  2349. var wh = GD.getRatioWithRotation(0, width, height);
  2350. this.setHeight(wh.ratioY);
  2351. this.setWidth(wh.ratioX);
  2352. return this;
  2353. },
  2354. getPosition: function () {
  2355. return {
  2356. x: this._x,
  2357. y: this._y
  2358. }
  2359. },
  2360. setPosition: function () {
  2361. var args = Array.prototype.slice.call(arguments, 0), x, y;
  2362. if (args.length === 0) {
  2363. return this;
  2364. } else if (args.length === 1) {
  2365. if (typeof args[0] != 'object') {
  2366. return this;
  2367. }
  2368. x = args[0].x;
  2369. y = args[0].y;
  2370. } else {
  2371. x = args[0];
  2372. y = args[1];
  2373. }
  2374. if ((x !== 0 && !x) || (y !== 0 && !y)) {
  2375. return this;
  2376. }
  2377. // var childNodes = this.childNodes, offset, childNode, p;
  2378. // for (var i = 0, len = childNodes.length; i < len; i++) {
  2379. // childNode = childNodes[i];
  2380. // p = childNode.getPosition();
  2381. // childNode.setPosition(x - (this._x-p.x)*this._ratioX, y - (this._y-p.y)*this._ratioY);
  2382. // }
  2383. // this._x = x;
  2384. // this._y = y;
  2385. // return this;
  2386. var childNodes, childNode, background, offset = {}, op, cp;
  2387. childNodes = this.childNodes;
  2388. background = this._background;
  2389. op = background.getPosition();
  2390. offset.x = x - op.x;
  2391. offset.y = y - op.y;
  2392. for (var i = 0, len = childNodes.length; i < len; i++) {
  2393. childNode = childNodes[i];
  2394. cp = childNode.getPosition();
  2395. childNode.setPosition(cp.x + offset.x, cp.y + offset.y);
  2396. }
  2397. this._x = x;
  2398. this._y = y;
  2399. this._position = {x: x, y: y};
  2400. return this;
  2401. },
  2402. getStyle: function (key) {
  2403. if (!key) {
  2404. return undefined;
  2405. }
  2406. return this._styleObject[key];
  2407. },
  2408. setStyle: function (key, value, force) {
  2409. var childNodes = this.childNodes, childNode;
  2410. for (var i = 0, len = childNodes.length; i < len; i++) {
  2411. childNode = childNodes[i];
  2412. if (key === '2d.visible') {
  2413. if (value === graphView.isVisible(childNode)) {
  2414. continue;
  2415. }
  2416. if (!value) {
  2417. childNode._savedIsVisible = graphView.isVisible(childNode);
  2418. childNode.s({
  2419. '2d.visible': false
  2420. })
  2421. } else {
  2422. childNode.s({
  2423. '2d.visible': childNode._savedIsVisible
  2424. })
  2425. }
  2426. continue;
  2427. }
  2428. childNode.s({
  2429. key: value
  2430. });
  2431. }
  2432. this._styleObject[key] = value;
  2433. return this;
  2434. },
  2435. calcSize: function () {
  2436. var background = this._background;
  2437. var position = background.getPosition(),
  2438. width = background.getWidth(),
  2439. height = background.getHeight();
  2440. this._width = width;
  2441. this._height = height;
  2442. this._x = position.x;
  2443. this._y = position.y;
  2444. this._position = {
  2445. x: this._x,
  2446. y: this._y
  2447. }
  2448. return this;
  2449. return this;
  2450. },
  2451. s: function (styleObj, force) {
  2452. var args = Array.prototype.slice.call(arguments, 0);
  2453. var styleObj;
  2454. if (args.length === 0) {
  2455. return this;
  2456. } else if (args.length === 1) {
  2457. styleObj = args[0];
  2458. } else {
  2459. this.setStyle(args[0], args[1]);
  2460. return this;
  2461. }
  2462. for (var key in styleObj) {
  2463. if (!styleObj.hasOwnProperty(key)) {
  2464. continue;
  2465. }
  2466. this.setStyle(key, styleObj[key], force);
  2467. }
  2468. return this;
  2469. },
  2470. init: function (x, y, width, height, angle) {
  2471. var that = this;
  2472. this.calcSize();
  2473. (function (width, height, angle) {
  2474. // that.setSize(width, height, angle);
  2475. // var wh = GD.getRatioWithRotation(angle, width, height);
  2476. // width = wh.ratioX;
  2477. // height = wh.ratioY;
  2478. var originHeight = that._height;
  2479. var originWidth = that._width;
  2480. var ratioY = height / originHeight;
  2481. var ratioX = width / originWidth;
  2482. var childNodes = that.childNodes,
  2483. childNode,p, op = that.getPosition(), h, ch, oy, w, cw, ox, name, borderRatio, borderWidth;
  2484. for (var i = 0, len = childNodes.length; i < len; i++) {
  2485. childNode = childNodes[i];
  2486. p = childNode.getPosition();
  2487. childNode.originHeight = childNode.originHeight || childNode.getHeight();
  2488. ch = childNode.getHeight();
  2489. cw = childNode.getWidth();
  2490. if (ch > 2) {
  2491. h = ch * ratioY;
  2492. childNode.setHeight(h);
  2493. }
  2494. if (cw > 2) {
  2495. w = cw * ratioX;
  2496. childNode.setWidth(w);
  2497. }
  2498. borderRatio = (ratioX + ratioY)*0.5;
  2499. if (childNode._nodeType === 'line') { // 如果是线,
  2500. if (childNode.getWidth() > childNode.getHeight()) {
  2501. borderRatio = ratioX;
  2502. } else {
  2503. borderRatio = ratioY;
  2504. }
  2505. }
  2506. name = childNode._nodename;
  2507. // if (childNode.borderWidth && name && ch > 2 && cw > 2) {
  2508. // borderWidth = childNode.borderWidth / borderRatio;
  2509. // if (borderWidth > ch*0.5 || borderWidth > cw *0.5) {
  2510. // // borderWidth = childNode.borderWidth;
  2511. // }
  2512. // childNode.borderWidth = borderWidth;
  2513. // childNode.a(name + '.borderwidth', borderWidth);
  2514. // }
  2515. }
  2516. that._height = height;
  2517. that._originHeight = height;
  2518. that._ratioY = ratioY;
  2519. that._width = width;
  2520. that._originWidth = width;
  2521. that._ratioX = ratioX;
  2522. })(width, height, angle);
  2523. that._x = width / 2;
  2524. that._y = height / 2;
  2525. that._rotation = 0;
  2526. // that.setPosition(x, y);
  2527. (function (x, y) {
  2528. var childNodes = that.childNodes, offset, childNode;
  2529. var w2 = that.getWidth() / 2, h2 = that.getHeight()/2;
  2530. for (var i = 0, len = childNodes.length; i < len; i++) {
  2531. childNode = childNodes[i];
  2532. offset = childNode.getPosition();
  2533. childNode.setPosition(x + offset.x * that._ratioX - w2, y + offset.y * that._ratioY - h2);
  2534. }
  2535. that._x = x;
  2536. that._y = y;
  2537. })(x, y);
  2538. // setTimeout(that.addEVent, 1000);
  2539. },
  2540. setRotation: function (angle) {
  2541. var that = this, _angle = that.getRotation();
  2542. if (angle!==0 && !angle || angle === _angle) {
  2543. return this;
  2544. }
  2545. var childNodes = this.childNodes, childNode, p = this.getPosition(), px = p.x, py = p.y;
  2546. for (var i = 0, len = childNodes.length; i < len; i++) {
  2547. childNode = childNodes[i];
  2548. var x = childNode.getPosition().x - px;
  2549. var y = childNode.getPosition().y - py;
  2550. childNode.setPosition(Math.cos(angle-_angle) * x - Math.sin(angle-_angle) * y + px, Math.cos(angle-_angle) * y + Math.sin(angle-_angle) * x + py);
  2551. childNode.setRotation(angle);
  2552. }
  2553. this._rotation = angle;
  2554. return this;
  2555. },
  2556. getRotation: function () {
  2557. return this._rotation;
  2558. },
  2559. setScale: function (sx, sy) {
  2560. var that = this,
  2561. childNodes = this.childNodes,
  2562. childNode;
  2563. if (sx === undefined || sx === null) return ;
  2564. if (sy === undefined || sy === null) {
  2565. sy = sx;
  2566. }
  2567. for (var i = 0, len = childNodes.length; i < len; i++) {
  2568. childNode = childNodes[i];
  2569. if (typeof childNode.setScale === 'function') {
  2570. childNode.setScale(sx, sy);
  2571. }
  2572. }
  2573. },
  2574. getScale: function () {
  2575. return this._background.getScale();
  2576. },
  2577. setScaleX: function (sx) {
  2578. if (sx === undefined || sx === null) return;
  2579. var that = this,
  2580. childNodes = this.childNodes,
  2581. childNode;
  2582. for (var i = 0, len = childNodes.length; i < len; i++) {
  2583. childNode = childNodes[i];
  2584. if (typeof childNode.setScaleX === 'function') {
  2585. childNode.setScaleX(sx);
  2586. }
  2587. }
  2588. },
  2589. setScaleY: function (sy) {
  2590. if (sy === undefined || sy === null) return;
  2591. var that = this,
  2592. childNodes = this.childNodes,
  2593. childNode;
  2594. for (var i = 0, len = childNodes.length; i < len; i++) {
  2595. childNode = childNodes[i];
  2596. if (typeof childNode.setScaleY === 'function') {
  2597. childNode.setScaleY(sy);
  2598. }
  2599. }
  2600. },
  2601. getScaleX: function () {
  2602. return this._background.getScaleX();
  2603. },
  2604. getScaleY: function () {
  2605. return this._background.getScaleY();
  2606. },
  2607. evert: function () {
  2608. var that = this,
  2609. childNodes = this.childNodes,
  2610. background = this._background,
  2611. bp = background.getPosition(),
  2612. bx = bp.x,
  2613. by = bp.y,
  2614. childNode, distanceX, distanceY, x, y, p, nx, ny;
  2615. for (var i = 0, len = childNodes.length; i < len; i++) {
  2616. childNode = childNodes[i];
  2617. p = childNode.getPosition();
  2618. x = p.x;
  2619. y = p.y;
  2620. distanceX = bx - x;
  2621. distanceY = by - y;
  2622. nx = bx + distanceX;
  2623. ny = by + distanceY;
  2624. childNode.setPosition(nx, ny);
  2625. if (typeof childNode.setScale === 'function') {
  2626. if (!(childNode._disallowEvert === true))
  2627. childNode.setScale(-1, -1);
  2628. }
  2629. }
  2630. },
  2631. evertX: function () {
  2632. var that = this,
  2633. childNodes = this.childNodes,
  2634. background = this._background,
  2635. bx = background.getPosition().x,
  2636. childNode, distance, x, p, nx;
  2637. for (var i = 0, len = childNodes.length; i < len; i++) {
  2638. childNode = childNodes[i];
  2639. p = childNode.getPosition();
  2640. x = p.x;
  2641. distance = bx - x;
  2642. nx = bx + distance;
  2643. childNode.setPosition(nx, p.y);
  2644. if (typeof childNode.setScaleX === 'function') {
  2645. if (!(childNode._disallowEvert === true))
  2646. childNode.setScaleX(-1);
  2647. }
  2648. }
  2649. },
  2650. evertY: function () {
  2651. var that = this,
  2652. childNodes = this.childNodes,
  2653. background = this._background,
  2654. by = background.getPosition().y,
  2655. childNode, distance, y, p, ny;
  2656. for (var i = 0, len = childNodes.length; i < len; i++) {
  2657. childNode = childNodes[i];
  2658. p = childNode.getPosition();
  2659. y = p.y;
  2660. distance = by - y;
  2661. ny = by + distance;
  2662. childNode.setPosition(p.x, ny);
  2663. if (typeof childNode.setScaleY === 'function') {
  2664. if (!(childNode._disallowEvert === true))
  2665. childNode.setScaleY(-1);
  2666. }
  2667. }
  2668. },
  2669. attr: function (key, value) {
  2670. var _attrObj = this._attrObj || {};
  2671. if (arguments.length === 1) {
  2672. return _attrObj[key];
  2673. }
  2674. var childNodes = this.childNodes, childNode;
  2675. _attrObj[key] = value;
  2676. for (var i = 0; childNode = childNodes[i++];) {
  2677. if (typeof childNode.a === 'function') {
  2678. childNode.a(key, value);
  2679. }
  2680. }
  2681. },
  2682. a: function () {
  2683. return this.attr.apply(this, arguments);
  2684. }
  2685. });
  2686. }