mm.js 112 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877
  1. ht.lib = ht.lib || {};
  2. if (!ht.lib['mm']) {
  3. ht.lib['mm'] = function (x, y, width, height, angle, localVarObj, localDynamicVar, nodename) {
  4. _ratio = GD.getRatioWithRotation(0, ratio);
  5. ht.lib['mm'].superClass.constructor.apply(this);
  6. this.localVarObj = localVarObj;
  7. this.localDynamicVar = localDynamicVar;
  8. this.childNodes = [];
  9. this._styleObject = {};
  10. this._originWidth = 53*_ratio.ratioX;
  11. this._originHeight = 30.36365*_ratio.ratioY;
  12. this._baseClass = "ht.lib.mm";
  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. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  36. var Lib_mmNode0type = 'oval';
  37. var Lib_mmNode0 = new ht.Node(),
  38. Lib_mmNode0BorderWidth = 2*2;
  39. if (Lib_mmNode0type === 'arc') {
  40. Lib_mmNode0BorderWidth *= 2;
  41. }
  42. Lib_mmNode0.setImage(GD.getRectJSON(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY, Lib_mmNode0type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  43. Lib_mmNode0.setPosition(27*ratio.ratioX, 8*ratio.ratioY);
  44. Lib_mmNode0.setSize(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY);
  45. Lib_mmNode0.s({
  46. 'pixelPerfect':true
  47. /*@AddPara@*/
  48. });
  49. Lib_mmNode0.a('node.width', 19.99998*_ratio.ratioX);
  50. Lib_mmNode0.a('node.height', 16.36363*_ratio.ratioY);
  51. Lib_mmNode0.a('node.type', Lib_mmNode0type);
  52. Lib_mmNode0.a('node.rect', [0, 0, 19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY]);
  53. Lib_mmNode0.a('node.background', 'rgba(255,255,255,0.003921569)');
  54. Lib_mmNode0.a('node.gradientcolor', '');
  55. Lib_mmNode0.a('node.gradient', '');
  56. Lib_mmNode0.a('node.borderwidth', Lib_mmNode0BorderWidth);
  57. Lib_mmNode0.a('node.color', 'rgba(255,0,255,1)');
  58. Lib_mmNode0.a('node.fillrect', [0,0,0,0]);
  59. Lib_mmNode0.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  60. Lib_mmNode0.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  61. Lib_mmNode0.a('node.fillgradient', '');
  62. if (Lib_mmNode0type !== 'rect') {
  63. Lib_mmNode0.a('node.arcFrom', parseFloat('@arcFrom@'));
  64. Lib_mmNode0.a('node.arcTo', parseFloat('@arcTo@'));
  65. Lib_mmNode0.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  66. }
  67. if (Lib_mmNode0type === 'arc') {
  68. Lib_mmNode0.a('node.arcOval', true);
  69. }
  70. Lib_mmNode0.setRotation(0*Math.PI/180);
  71. Lib_mmNode0.borderWidth = Lib_mmNode0BorderWidth;
  72. Lib_mmNode0.borderFillwidth = Lib_mmNode0BorderWidth;
  73. dataModel.add(Lib_mmNode0);
  74. Lib_mmNode0._nodename = 'Lib_mmNode0'
  75. Lib_mmNode0._nodeType = 'rect';
  76. zoomNodeList.push({
  77. node: Lib_mmNode0,
  78. attr: 'node.borderwidth'
  79. });
  80. (function (node, _img) {
  81. var setWidth = node.setWidth,
  82. setHeight = node.setHeight;
  83. node.setWidth = function (width) {
  84. if (width === this.getWidth()) return ;
  85. var height = this.getHeight();
  86. this.a('node.width', width);
  87. this.a('node.rect', [0,0,width, height]);
  88. setWidth.apply(this, arguments);
  89. }
  90. node.setHeight = function (height) {
  91. if (height === this.getHeight()) return ;
  92. var width = this.getWidth();
  93. this.a('node.height', height);
  94. this.a('node.rect', [0,0,width, height]);
  95. setHeight.apply(this, arguments);
  96. }
  97. })(Lib_mmNode0, Lib_mmNode0.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  98. var Lib_mmNode1type = 'oval';
  99. var Lib_mmNode1 = new ht.Node(),
  100. Lib_mmNode1BorderWidth = 2*2;
  101. if (Lib_mmNode1type === 'arc') {
  102. Lib_mmNode1BorderWidth *= 2;
  103. }
  104. Lib_mmNode1.setImage(GD.getRectJSON(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY, Lib_mmNode1type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  105. Lib_mmNode1.setPosition(27*ratio.ratioX, 22*ratio.ratioY);
  106. Lib_mmNode1.setSize(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY);
  107. Lib_mmNode1.s({
  108. 'pixelPerfect':true
  109. /*@AddPara@*/
  110. });
  111. Lib_mmNode1.a('node.width', 19.99998*_ratio.ratioX);
  112. Lib_mmNode1.a('node.height', 16.36363*_ratio.ratioY);
  113. Lib_mmNode1.a('node.type', Lib_mmNode1type);
  114. Lib_mmNode1.a('node.rect', [0, 0, 19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY]);
  115. Lib_mmNode1.a('node.background', 'rgba(255,255,255,0.003921569)');
  116. Lib_mmNode1.a('node.gradientcolor', '');
  117. Lib_mmNode1.a('node.gradient', '');
  118. Lib_mmNode1.a('node.borderwidth', Lib_mmNode1BorderWidth);
  119. Lib_mmNode1.a('node.color', 'rgba(255,0,255,1)');
  120. Lib_mmNode1.a('node.fillrect', [0,0,0,0]);
  121. Lib_mmNode1.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  122. Lib_mmNode1.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  123. Lib_mmNode1.a('node.fillgradient', '');
  124. if (Lib_mmNode1type !== 'rect') {
  125. Lib_mmNode1.a('node.arcFrom', parseFloat('@arcFrom@'));
  126. Lib_mmNode1.a('node.arcTo', parseFloat('@arcTo@'));
  127. Lib_mmNode1.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  128. }
  129. if (Lib_mmNode1type === 'arc') {
  130. Lib_mmNode1.a('node.arcOval', true);
  131. }
  132. Lib_mmNode1.setRotation(0*Math.PI/180);
  133. Lib_mmNode1.borderWidth = Lib_mmNode1BorderWidth;
  134. Lib_mmNode1.borderFillwidth = Lib_mmNode1BorderWidth;
  135. dataModel.add(Lib_mmNode1);
  136. Lib_mmNode1._nodename = 'Lib_mmNode1'
  137. Lib_mmNode1._nodeType = 'rect';
  138. zoomNodeList.push({
  139. node: Lib_mmNode1,
  140. attr: 'node.borderwidth'
  141. });
  142. (function (node, _img) {
  143. var setWidth = node.setWidth,
  144. setHeight = node.setHeight;
  145. node.setWidth = function (width) {
  146. if (width === this.getWidth()) return ;
  147. var height = this.getHeight();
  148. this.a('node.width', width);
  149. this.a('node.rect', [0,0,width, height]);
  150. setWidth.apply(this, arguments);
  151. }
  152. node.setHeight = function (height) {
  153. if (height === this.getHeight()) return ;
  154. var width = this.getWidth();
  155. this.a('node.height', height);
  156. this.a('node.rect', [0,0,width, height]);
  157. setHeight.apply(this, arguments);
  158. }
  159. })(Lib_mmNode1, Lib_mmNode1.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  160. var Lib_mmNode2type = 'oval';
  161. var Lib_mmNode2 = new ht.Node(),
  162. Lib_mmNode2BorderWidth = 2*2;
  163. if (Lib_mmNode2type === 'arc') {
  164. Lib_mmNode2BorderWidth *= 2;
  165. }
  166. Lib_mmNode2.setImage(GD.getRectJSON(20*_ratio.ratioX, 16.36365*_ratio.ratioY, Lib_mmNode2type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  167. Lib_mmNode2.setPosition(10*ratio.ratioX, 8*ratio.ratioY);
  168. Lib_mmNode2.setSize(20*_ratio.ratioX, 16.36365*_ratio.ratioY);
  169. Lib_mmNode2.s({
  170. 'pixelPerfect':true
  171. /*@AddPara@*/
  172. });
  173. Lib_mmNode2.a('node.width', 20*_ratio.ratioX);
  174. Lib_mmNode2.a('node.height', 16.36365*_ratio.ratioY);
  175. Lib_mmNode2.a('node.type', Lib_mmNode2type);
  176. Lib_mmNode2.a('node.rect', [0, 0, 20*_ratio.ratioX, 16.36365*_ratio.ratioY]);
  177. Lib_mmNode2.a('node.background', 'rgba(255,255,255,0.003921569)');
  178. Lib_mmNode2.a('node.gradientcolor', '');
  179. Lib_mmNode2.a('node.gradient', '');
  180. Lib_mmNode2.a('node.borderwidth', Lib_mmNode2BorderWidth);
  181. Lib_mmNode2.a('node.color', 'rgba(255,0,255,1)');
  182. Lib_mmNode2.a('node.fillrect', [0,0,0,0]);
  183. Lib_mmNode2.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  184. Lib_mmNode2.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  185. Lib_mmNode2.a('node.fillgradient', '');
  186. if (Lib_mmNode2type !== 'rect') {
  187. Lib_mmNode2.a('node.arcFrom', parseFloat('@arcFrom@'));
  188. Lib_mmNode2.a('node.arcTo', parseFloat('@arcTo@'));
  189. Lib_mmNode2.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  190. }
  191. if (Lib_mmNode2type === 'arc') {
  192. Lib_mmNode2.a('node.arcOval', true);
  193. }
  194. Lib_mmNode2.setRotation(0*Math.PI/180);
  195. Lib_mmNode2.borderWidth = Lib_mmNode2BorderWidth;
  196. Lib_mmNode2.borderFillwidth = Lib_mmNode2BorderWidth;
  197. dataModel.add(Lib_mmNode2);
  198. Lib_mmNode2._nodename = 'Lib_mmNode2'
  199. Lib_mmNode2._nodeType = 'rect';
  200. zoomNodeList.push({
  201. node: Lib_mmNode2,
  202. attr: 'node.borderwidth'
  203. });
  204. (function (node, _img) {
  205. var setWidth = node.setWidth,
  206. setHeight = node.setHeight;
  207. node.setWidth = function (width) {
  208. if (width === this.getWidth()) return ;
  209. var height = this.getHeight();
  210. this.a('node.width', width);
  211. this.a('node.rect', [0,0,width, height]);
  212. setWidth.apply(this, arguments);
  213. }
  214. node.setHeight = function (height) {
  215. if (height === this.getHeight()) return ;
  216. var width = this.getWidth();
  217. this.a('node.height', height);
  218. this.a('node.rect', [0,0,width, height]);
  219. setHeight.apply(this, arguments);
  220. }
  221. })(Lib_mmNode2, Lib_mmNode2.getImage());var Lib_mmNode3points=[27, 17,27, 22],
  222. Lib_mmNode3rect=ht.Default.unionPoint([{x:27,y:17},{x:27,y:22}]),
  223. Lib_mmNode3compspts=[];
  224. _ratio = GD.getRatioWithRotation(0, ratio);
  225. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  226. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  227. for(var i=0;i<Lib_mmNode3points.length;i++){
  228. if(i%2==0){
  229. Lib_mmNode3compspts.push(Lib_mmNode3points[i]-Lib_mmNode3rect.x);
  230. }else{
  231. Lib_mmNode3compspts.push(Lib_mmNode3points[i]-Lib_mmNode3rect.y);
  232. }
  233. }
  234. var Lib_mmNode3ptslength=Lib_mmNode3compspts.length;
  235. if (Lib_mmNode3rect.height === 0) {
  236. Lib_mmNode3compspts[0] -= 0;
  237. Lib_mmNode3compspts[Lib_mmNode3ptslength-2] += 0;
  238. } else if (Lib_mmNode3rect.width === 0){
  239. Lib_mmNode3compspts[1] -= 0;
  240. Lib_mmNode3compspts[Lib_mmNode3ptslength-1] += 0;
  241. } else {
  242. Lib_mmNode3compspts[0] -= 0;
  243. Lib_mmNode3compspts[1] -= 0;
  244. Lib_mmNode3compspts[Lib_mmNode3ptslength-2] += 0;
  245. Lib_mmNode3compspts[Lib_mmNode3ptslength-1] += 0;
  246. }
  247. Lib_mmNode3 = new ht.Node();
  248. Lib_mmNode3.borderWidth = 2;
  249. Lib_mmNode3rect.width = Lib_mmNode3rect.width === 0 ? 0.0001 : Lib_mmNode3rect.width;
  250. Lib_mmNode3rect.height = Lib_mmNode3rect.height === 0 ? 0.0001 : Lib_mmNode3rect.height;
  251. var Lib_mmNode3endCompspts = [Lib_mmNode3compspts[Lib_mmNode3ptslength-2],Lib_mmNode3compspts[Lib_mmNode3ptslength-1],0,0];
  252. var Lib_mmNode3startCompspts = [Lib_mmNode3compspts[0],Lib_mmNode3compspts[1],0,0];
  253. Lib_mmNode3.setImage(GD.getPolyLineJSON());
  254. Lib_mmNode3.setPosition(Lib_mmNode3rect.x+Lib_mmNode3rect.width/2,Lib_mmNode3rect.y+Lib_mmNode3rect.height/2);
  255. Lib_mmNode3.setSize(Lib_mmNode3rect.width,Lib_mmNode3rect.height);
  256. Lib_mmNode3.setStyle("opacity",1);
  257. Lib_mmNode3.s({'pixelPerfect':true});
  258. Lib_mmNode3borderwidth=2;
  259. Lib_mmNode3.setRotation(0);
  260. dataModel.add(Lib_mmNode3);
  261. Lib_mmNode3.a('node.points',Lib_mmNode3compspts);
  262. Lib_mmNode3.a('node.segments',[1,2]);
  263. Lib_mmNode3.a('node.color','rgba(255,0,255,1)');
  264. Lib_mmNode3.a('node.borderPattern',getDashStyle("@borderPattern@"));
  265. Lib_mmNode3.a('node.borderColor','rgba(255,0,255,1)');
  266. Lib_mmNode3.a('node.background','rgba(255,0,255,1)');
  267. Lib_mmNode3.a('node.gradient','');
  268. Lib_mmNode3.a('node.gradientcolor','rgba(255,0,255,1)');
  269. Lib_mmNode3.a('node.endCompspts',Lib_mmNode3endCompspts);
  270. Lib_mmNode3.a('node.startCompspts',Lib_mmNode3startCompspts);
  271. (function (node, img, compspts, endCompspts, startCompspts) {
  272. var position = node.getPosition(),
  273. w = node.getWidth()*_ratio.ratioX,
  274. h = node.getHeight()*_ratio.ratioY;
  275. function resetPoints(rx, ry) {
  276. for (var i = 0, len = compspts.length; i < len; i++) {
  277. if (i%2 === 0) {
  278. compspts[i]*=rx;
  279. } else {
  280. compspts[i]*=ry;
  281. }
  282. }
  283. endCompspts[0] = compspts[compspts.length-2];
  284. endCompspts[1] = compspts[compspts.length-1];
  285. endCompspts[2] *= rx;
  286. endCompspts[3] *= ry;
  287. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  288. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  289. startCompspts[0] = compspts[0];
  290. startCompspts[1] = compspts[1];
  291. startCompspts[2] *= rx;
  292. startCompspts[3] *= ry;
  293. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  294. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  295. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  296. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  297. }
  298. node.setSize(w, h);
  299. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  300. node.a('node.width', w);
  301. node.a('node.height', h);
  302. resetPoints(_ratio.ratioX, _ratio.ratioY);
  303. node.borderWidth = 2;
  304. node.a('node.borderwidth',node.borderWidth);
  305. node._nodename = 'Lib_mmNode3';
  306. node._nodeType = 'line';
  307. zoomNodeList.push({
  308. node: node,
  309. attr: 'node.borderwidth'
  310. });
  311. var setWidth = node.setWidth,
  312. setHeight = node.setHeight,
  313. timer, rx = 1, ry = 1;
  314. node.setWidth = function (width) {
  315. var _width = this.getWidth();
  316. rx = width / _width;
  317. node.a('node.width', width);
  318. setWidth.apply(this, arguments);
  319. resetPoints(rx, 1);
  320. }
  321. node.setHeight = function (height) {
  322. var _height = this.getHeight();
  323. ry = height / _height;
  324. node.a('node.height', height);
  325. setHeight.apply(this, arguments);
  326. resetPoints(1, ry);
  327. }
  328. })(Lib_mmNode3, Lib_mmNode3.getImage(), Lib_mmNode3compspts, Lib_mmNode3endCompspts, Lib_mmNode3startCompspts);
  329. var Lib_mmNode4points=[27, 22,32, 25],
  330. Lib_mmNode4rect=ht.Default.unionPoint([{x:27,y:22},{x:32,y:25}]),
  331. Lib_mmNode4compspts=[];
  332. _ratio = GD.getRatioWithRotation(0, ratio);
  333. var _startratio = GD.getRatioWithRotation(3.68201217139115, ratio),
  334. _endratio = GD.getRatioWithRotation(0.540419517801362, ratio);
  335. for(var i=0;i<Lib_mmNode4points.length;i++){
  336. if(i%2==0){
  337. Lib_mmNode4compspts.push(Lib_mmNode4points[i]-Lib_mmNode4rect.x);
  338. }else{
  339. Lib_mmNode4compspts.push(Lib_mmNode4points[i]-Lib_mmNode4rect.y);
  340. }
  341. }
  342. var Lib_mmNode4ptslength=Lib_mmNode4compspts.length;
  343. if (Lib_mmNode4rect.height === 0) {
  344. Lib_mmNode4compspts[0] -= 0;
  345. Lib_mmNode4compspts[Lib_mmNode4ptslength-2] += 0;
  346. } else if (Lib_mmNode4rect.width === 0){
  347. Lib_mmNode4compspts[1] -= 0;
  348. Lib_mmNode4compspts[Lib_mmNode4ptslength-1] += 0;
  349. } else {
  350. Lib_mmNode4compspts[0] -= 0;
  351. Lib_mmNode4compspts[1] -= 0;
  352. Lib_mmNode4compspts[Lib_mmNode4ptslength-2] += 0;
  353. Lib_mmNode4compspts[Lib_mmNode4ptslength-1] += 0;
  354. }
  355. Lib_mmNode4 = new ht.Node();
  356. Lib_mmNode4.borderWidth = 2;
  357. Lib_mmNode4rect.width = Lib_mmNode4rect.width === 0 ? 0.0001 : Lib_mmNode4rect.width;
  358. Lib_mmNode4rect.height = Lib_mmNode4rect.height === 0 ? 0.0001 : Lib_mmNode4rect.height;
  359. var Lib_mmNode4endCompspts = [Lib_mmNode4compspts[Lib_mmNode4ptslength-2],Lib_mmNode4compspts[Lib_mmNode4ptslength-1],0,0];
  360. var Lib_mmNode4startCompspts = [Lib_mmNode4compspts[0],Lib_mmNode4compspts[1],0,0];
  361. Lib_mmNode4.setImage(GD.getPolyLineJSON());
  362. Lib_mmNode4.setPosition(Lib_mmNode4rect.x+Lib_mmNode4rect.width/2,Lib_mmNode4rect.y+Lib_mmNode4rect.height/2);
  363. Lib_mmNode4.setSize(Lib_mmNode4rect.width,Lib_mmNode4rect.height);
  364. Lib_mmNode4.setStyle("opacity",1);
  365. Lib_mmNode4.s({'pixelPerfect':true});
  366. Lib_mmNode4borderwidth=2;
  367. Lib_mmNode4.setRotation(0);
  368. dataModel.add(Lib_mmNode4);
  369. Lib_mmNode4.a('node.points',Lib_mmNode4compspts);
  370. Lib_mmNode4.a('node.segments',[1,2]);
  371. Lib_mmNode4.a('node.color','rgba(255,0,255,1)');
  372. Lib_mmNode4.a('node.borderPattern',getDashStyle("@borderPattern@"));
  373. Lib_mmNode4.a('node.borderColor','rgba(255,0,255,1)');
  374. Lib_mmNode4.a('node.background','rgba(255,0,255,1)');
  375. Lib_mmNode4.a('node.gradient','');
  376. Lib_mmNode4.a('node.gradientcolor','rgba(255,0,255,1)');
  377. Lib_mmNode4.a('node.endCompspts',Lib_mmNode4endCompspts);
  378. Lib_mmNode4.a('node.startCompspts',Lib_mmNode4startCompspts);
  379. (function (node, img, compspts, endCompspts, startCompspts) {
  380. var position = node.getPosition(),
  381. w = node.getWidth()*_ratio.ratioX,
  382. h = node.getHeight()*_ratio.ratioY;
  383. function resetPoints(rx, ry) {
  384. for (var i = 0, len = compspts.length; i < len; i++) {
  385. if (i%2 === 0) {
  386. compspts[i]*=rx;
  387. } else {
  388. compspts[i]*=ry;
  389. }
  390. }
  391. endCompspts[0] = compspts[compspts.length-2];
  392. endCompspts[1] = compspts[compspts.length-1];
  393. endCompspts[2] *= rx;
  394. endCompspts[3] *= ry;
  395. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  396. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  397. startCompspts[0] = compspts[0];
  398. startCompspts[1] = compspts[1];
  399. startCompspts[2] *= rx;
  400. startCompspts[3] *= ry;
  401. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  402. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  403. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  404. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  405. }
  406. node.setSize(w, h);
  407. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  408. node.a('node.width', w);
  409. node.a('node.height', h);
  410. resetPoints(_ratio.ratioX, _ratio.ratioY);
  411. node.borderWidth = 2;
  412. node.a('node.borderwidth',node.borderWidth);
  413. node._nodename = 'Lib_mmNode4';
  414. node._nodeType = 'line';
  415. zoomNodeList.push({
  416. node: node,
  417. attr: 'node.borderwidth'
  418. });
  419. var setWidth = node.setWidth,
  420. setHeight = node.setHeight,
  421. timer, rx = 1, ry = 1;
  422. node.setWidth = function (width) {
  423. var _width = this.getWidth();
  424. rx = width / _width;
  425. node.a('node.width', width);
  426. setWidth.apply(this, arguments);
  427. resetPoints(rx, 1);
  428. }
  429. node.setHeight = function (height) {
  430. var _height = this.getHeight();
  431. ry = height / _height;
  432. node.a('node.height', height);
  433. setHeight.apply(this, arguments);
  434. resetPoints(1, ry);
  435. }
  436. })(Lib_mmNode4, Lib_mmNode4.getImage(), Lib_mmNode4compspts, Lib_mmNode4endCompspts, Lib_mmNode4startCompspts);
  437. var Lib_mmNode5points=[27, 22,22, 25],
  438. Lib_mmNode5rect=ht.Default.unionPoint([{x:27,y:22},{x:22,y:25}]),
  439. Lib_mmNode5compspts=[];
  440. _ratio = GD.getRatioWithRotation(0, ratio);
  441. var _startratio = GD.getRatioWithRotation(-0.540419517801362, ratio),
  442. _endratio = GD.getRatioWithRotation(2.60117313578843, ratio);
  443. for(var i=0;i<Lib_mmNode5points.length;i++){
  444. if(i%2==0){
  445. Lib_mmNode5compspts.push(Lib_mmNode5points[i]-Lib_mmNode5rect.x);
  446. }else{
  447. Lib_mmNode5compspts.push(Lib_mmNode5points[i]-Lib_mmNode5rect.y);
  448. }
  449. }
  450. var Lib_mmNode5ptslength=Lib_mmNode5compspts.length;
  451. if (Lib_mmNode5rect.height === 0) {
  452. Lib_mmNode5compspts[0] -= 0;
  453. Lib_mmNode5compspts[Lib_mmNode5ptslength-2] += 0;
  454. } else if (Lib_mmNode5rect.width === 0){
  455. Lib_mmNode5compspts[1] -= 0;
  456. Lib_mmNode5compspts[Lib_mmNode5ptslength-1] += 0;
  457. } else {
  458. Lib_mmNode5compspts[0] -= 0;
  459. Lib_mmNode5compspts[1] -= 0;
  460. Lib_mmNode5compspts[Lib_mmNode5ptslength-2] += 0;
  461. Lib_mmNode5compspts[Lib_mmNode5ptslength-1] += 0;
  462. }
  463. Lib_mmNode5 = new ht.Node();
  464. Lib_mmNode5.borderWidth = 2;
  465. Lib_mmNode5rect.width = Lib_mmNode5rect.width === 0 ? 0.0001 : Lib_mmNode5rect.width;
  466. Lib_mmNode5rect.height = Lib_mmNode5rect.height === 0 ? 0.0001 : Lib_mmNode5rect.height;
  467. var Lib_mmNode5endCompspts = [Lib_mmNode5compspts[Lib_mmNode5ptslength-2],Lib_mmNode5compspts[Lib_mmNode5ptslength-1],0,0];
  468. var Lib_mmNode5startCompspts = [Lib_mmNode5compspts[0],Lib_mmNode5compspts[1],0,0];
  469. Lib_mmNode5.setImage(GD.getPolyLineJSON());
  470. Lib_mmNode5.setPosition(Lib_mmNode5rect.x+Lib_mmNode5rect.width/2,Lib_mmNode5rect.y+Lib_mmNode5rect.height/2);
  471. Lib_mmNode5.setSize(Lib_mmNode5rect.width,Lib_mmNode5rect.height);
  472. Lib_mmNode5.setStyle("opacity",1);
  473. Lib_mmNode5.s({'pixelPerfect':true});
  474. Lib_mmNode5borderwidth=2;
  475. Lib_mmNode5.setRotation(0);
  476. dataModel.add(Lib_mmNode5);
  477. Lib_mmNode5.a('node.points',Lib_mmNode5compspts);
  478. Lib_mmNode5.a('node.segments',[1,2]);
  479. Lib_mmNode5.a('node.color','rgba(255,0,255,1)');
  480. Lib_mmNode5.a('node.borderPattern',getDashStyle("@borderPattern@"));
  481. Lib_mmNode5.a('node.borderColor','rgba(255,0,255,1)');
  482. Lib_mmNode5.a('node.background','rgba(255,0,255,1)');
  483. Lib_mmNode5.a('node.gradient','');
  484. Lib_mmNode5.a('node.gradientcolor','rgba(255,0,255,1)');
  485. Lib_mmNode5.a('node.endCompspts',Lib_mmNode5endCompspts);
  486. Lib_mmNode5.a('node.startCompspts',Lib_mmNode5startCompspts);
  487. (function (node, img, compspts, endCompspts, startCompspts) {
  488. var position = node.getPosition(),
  489. w = node.getWidth()*_ratio.ratioX,
  490. h = node.getHeight()*_ratio.ratioY;
  491. function resetPoints(rx, ry) {
  492. for (var i = 0, len = compspts.length; i < len; i++) {
  493. if (i%2 === 0) {
  494. compspts[i]*=rx;
  495. } else {
  496. compspts[i]*=ry;
  497. }
  498. }
  499. endCompspts[0] = compspts[compspts.length-2];
  500. endCompspts[1] = compspts[compspts.length-1];
  501. endCompspts[2] *= rx;
  502. endCompspts[3] *= ry;
  503. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  504. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  505. startCompspts[0] = compspts[0];
  506. startCompspts[1] = compspts[1];
  507. startCompspts[2] *= rx;
  508. startCompspts[3] *= ry;
  509. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  510. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  511. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  512. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  513. }
  514. node.setSize(w, h);
  515. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  516. node.a('node.width', w);
  517. node.a('node.height', h);
  518. resetPoints(_ratio.ratioX, _ratio.ratioY);
  519. node.borderWidth = 2;
  520. node.a('node.borderwidth',node.borderWidth);
  521. node._nodename = 'Lib_mmNode5';
  522. node._nodeType = 'line';
  523. zoomNodeList.push({
  524. node: node,
  525. attr: 'node.borderwidth'
  526. });
  527. var setWidth = node.setWidth,
  528. setHeight = node.setHeight,
  529. timer, rx = 1, ry = 1;
  530. node.setWidth = function (width) {
  531. var _width = this.getWidth();
  532. rx = width / _width;
  533. node.a('node.width', width);
  534. setWidth.apply(this, arguments);
  535. resetPoints(rx, 1);
  536. }
  537. node.setHeight = function (height) {
  538. var _height = this.getHeight();
  539. ry = height / _height;
  540. node.a('node.height', height);
  541. setHeight.apply(this, arguments);
  542. resetPoints(1, ry);
  543. }
  544. })(Lib_mmNode5, Lib_mmNode5.getImage(), Lib_mmNode5compspts, Lib_mmNode5endCompspts, Lib_mmNode5startCompspts);
  545. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  546. var Lib_mmNode6type = 'oval';
  547. var Lib_mmNode6 = new ht.Node(),
  548. Lib_mmNode6BorderWidth = 2*2;
  549. if (Lib_mmNode6type === 'arc') {
  550. Lib_mmNode6BorderWidth *= 2;
  551. }
  552. Lib_mmNode6.setImage(GD.getRectJSON(20*_ratio.ratioX, 16.36365*_ratio.ratioY, Lib_mmNode6type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  553. Lib_mmNode6.setPosition(10*ratio.ratioX, 22*ratio.ratioY);
  554. Lib_mmNode6.setSize(20*_ratio.ratioX, 16.36365*_ratio.ratioY);
  555. Lib_mmNode6.s({
  556. 'pixelPerfect':true
  557. /*@AddPara@*/
  558. });
  559. Lib_mmNode6.a('node.width', 20*_ratio.ratioX);
  560. Lib_mmNode6.a('node.height', 16.36365*_ratio.ratioY);
  561. Lib_mmNode6.a('node.type', Lib_mmNode6type);
  562. Lib_mmNode6.a('node.rect', [0, 0, 20*_ratio.ratioX, 16.36365*_ratio.ratioY]);
  563. Lib_mmNode6.a('node.background', 'rgba(255,255,255,0.003921569)');
  564. Lib_mmNode6.a('node.gradientcolor', '');
  565. Lib_mmNode6.a('node.gradient', '');
  566. Lib_mmNode6.a('node.borderwidth', Lib_mmNode6BorderWidth);
  567. Lib_mmNode6.a('node.color', 'rgba(255,0,255,1)');
  568. Lib_mmNode6.a('node.fillrect', [0,0,0,0]);
  569. Lib_mmNode6.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  570. Lib_mmNode6.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  571. Lib_mmNode6.a('node.fillgradient', '');
  572. if (Lib_mmNode6type !== 'rect') {
  573. Lib_mmNode6.a('node.arcFrom', parseFloat('@arcFrom@'));
  574. Lib_mmNode6.a('node.arcTo', parseFloat('@arcTo@'));
  575. Lib_mmNode6.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  576. }
  577. if (Lib_mmNode6type === 'arc') {
  578. Lib_mmNode6.a('node.arcOval', true);
  579. }
  580. Lib_mmNode6.setRotation(0*Math.PI/180);
  581. Lib_mmNode6.borderWidth = Lib_mmNode6BorderWidth;
  582. Lib_mmNode6.borderFillwidth = Lib_mmNode6BorderWidth;
  583. dataModel.add(Lib_mmNode6);
  584. Lib_mmNode6._nodename = 'Lib_mmNode6'
  585. Lib_mmNode6._nodeType = 'rect';
  586. zoomNodeList.push({
  587. node: Lib_mmNode6,
  588. attr: 'node.borderwidth'
  589. });
  590. (function (node, _img) {
  591. var setWidth = node.setWidth,
  592. setHeight = node.setHeight;
  593. node.setWidth = function (width) {
  594. if (width === this.getWidth()) return ;
  595. var height = this.getHeight();
  596. this.a('node.width', width);
  597. this.a('node.rect', [0,0,width, height]);
  598. setWidth.apply(this, arguments);
  599. }
  600. node.setHeight = function (height) {
  601. if (height === this.getHeight()) return ;
  602. var width = this.getWidth();
  603. this.a('node.height', height);
  604. this.a('node.rect', [0,0,width, height]);
  605. setHeight.apply(this, arguments);
  606. }
  607. })(Lib_mmNode6, Lib_mmNode6.getImage());var Lib_mmNode7_0points=[27, 3,27, 8],
  608. Lib_mmNode7_0rect=ht.Default.unionPoint([{x:27,y:3},{x:27,y:8}]),
  609. Lib_mmNode7_0compspts=[];
  610. _ratio = GD.getRatioWithRotation(0, ratio);
  611. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  612. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  613. for(var i=0;i<Lib_mmNode7_0points.length;i++){
  614. if(i%2==0){
  615. Lib_mmNode7_0compspts.push(Lib_mmNode7_0points[i]-Lib_mmNode7_0rect.x);
  616. }else{
  617. Lib_mmNode7_0compspts.push(Lib_mmNode7_0points[i]-Lib_mmNode7_0rect.y);
  618. }
  619. }
  620. var Lib_mmNode7_0ptslength=Lib_mmNode7_0compspts.length;
  621. if (Lib_mmNode7_0rect.height === 0) {
  622. Lib_mmNode7_0compspts[0] -= 0;
  623. Lib_mmNode7_0compspts[Lib_mmNode7_0ptslength-2] += 0;
  624. } else if (Lib_mmNode7_0rect.width === 0){
  625. Lib_mmNode7_0compspts[1] -= 0;
  626. Lib_mmNode7_0compspts[Lib_mmNode7_0ptslength-1] += 0;
  627. } else {
  628. Lib_mmNode7_0compspts[0] -= 0;
  629. Lib_mmNode7_0compspts[1] -= 0;
  630. Lib_mmNode7_0compspts[Lib_mmNode7_0ptslength-2] += 0;
  631. Lib_mmNode7_0compspts[Lib_mmNode7_0ptslength-1] += 0;
  632. }
  633. Lib_mmNode7_0 = new ht.Node();
  634. Lib_mmNode7_0.borderWidth = 2;
  635. Lib_mmNode7_0rect.width = Lib_mmNode7_0rect.width === 0 ? 0.0001 : Lib_mmNode7_0rect.width;
  636. Lib_mmNode7_0rect.height = Lib_mmNode7_0rect.height === 0 ? 0.0001 : Lib_mmNode7_0rect.height;
  637. var Lib_mmNode7_0endCompspts = [Lib_mmNode7_0compspts[Lib_mmNode7_0ptslength-2],Lib_mmNode7_0compspts[Lib_mmNode7_0ptslength-1],0,0];
  638. var Lib_mmNode7_0startCompspts = [Lib_mmNode7_0compspts[0],Lib_mmNode7_0compspts[1],0,0];
  639. Lib_mmNode7_0.setImage(GD.getPolyLineJSON());
  640. Lib_mmNode7_0.setPosition(Lib_mmNode7_0rect.x+Lib_mmNode7_0rect.width/2,Lib_mmNode7_0rect.y+Lib_mmNode7_0rect.height/2);
  641. Lib_mmNode7_0.setSize(Lib_mmNode7_0rect.width,Lib_mmNode7_0rect.height);
  642. Lib_mmNode7_0.setStyle("opacity",1);
  643. Lib_mmNode7_0.s({'pixelPerfect':true});
  644. Lib_mmNode7_0borderwidth=2;
  645. Lib_mmNode7_0.setRotation(0);
  646. dataModel.add(Lib_mmNode7_0);
  647. Lib_mmNode7_0.a('node.points',Lib_mmNode7_0compspts);
  648. Lib_mmNode7_0.a('node.segments',[1,2]);
  649. Lib_mmNode7_0.a('node.color','rgba(255,0,255,1)');
  650. Lib_mmNode7_0.a('node.borderPattern',getDashStyle("@borderPattern@"));
  651. Lib_mmNode7_0.a('node.borderColor','rgba(255,0,255,1)');
  652. Lib_mmNode7_0.a('node.background','rgba(255,0,255,1)');
  653. Lib_mmNode7_0.a('node.gradient','');
  654. Lib_mmNode7_0.a('node.gradientcolor','rgba(255,0,255,1)');
  655. Lib_mmNode7_0.a('node.endCompspts',Lib_mmNode7_0endCompspts);
  656. Lib_mmNode7_0.a('node.startCompspts',Lib_mmNode7_0startCompspts);
  657. (function (node, img, compspts, endCompspts, startCompspts) {
  658. var position = node.getPosition(),
  659. w = node.getWidth()*_ratio.ratioX,
  660. h = node.getHeight()*_ratio.ratioY;
  661. function resetPoints(rx, ry) {
  662. for (var i = 0, len = compspts.length; i < len; i++) {
  663. if (i%2 === 0) {
  664. compspts[i]*=rx;
  665. } else {
  666. compspts[i]*=ry;
  667. }
  668. }
  669. endCompspts[0] = compspts[compspts.length-2];
  670. endCompspts[1] = compspts[compspts.length-1];
  671. endCompspts[2] *= rx;
  672. endCompspts[3] *= ry;
  673. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  674. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  675. startCompspts[0] = compspts[0];
  676. startCompspts[1] = compspts[1];
  677. startCompspts[2] *= rx;
  678. startCompspts[3] *= ry;
  679. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  680. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  681. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  682. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  683. }
  684. node.setSize(w, h);
  685. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  686. node.a('node.width', w);
  687. node.a('node.height', h);
  688. resetPoints(_ratio.ratioX, _ratio.ratioY);
  689. node.borderWidth = 2;
  690. node.a('node.borderwidth',node.borderWidth);
  691. node._nodename = 'Lib_mmNode7_0';
  692. node._nodeType = 'line';
  693. zoomNodeList.push({
  694. node: node,
  695. attr: 'node.borderwidth'
  696. });
  697. var setWidth = node.setWidth,
  698. setHeight = node.setHeight,
  699. timer, rx = 1, ry = 1;
  700. node.setWidth = function (width) {
  701. var _width = this.getWidth();
  702. rx = width / _width;
  703. node.a('node.width', width);
  704. setWidth.apply(this, arguments);
  705. resetPoints(rx, 1);
  706. }
  707. node.setHeight = function (height) {
  708. var _height = this.getHeight();
  709. ry = height / _height;
  710. node.a('node.height', height);
  711. setHeight.apply(this, arguments);
  712. resetPoints(1, ry);
  713. }
  714. })(Lib_mmNode7_0, Lib_mmNode7_0.getImage(), Lib_mmNode7_0compspts, Lib_mmNode7_0endCompspts, Lib_mmNode7_0startCompspts);
  715. var Lib_mmNode7_1points=[27, 8,32, 11],
  716. Lib_mmNode7_1rect=ht.Default.unionPoint([{x:27,y:8},{x:32,y:11}]),
  717. Lib_mmNode7_1compspts=[];
  718. _ratio = GD.getRatioWithRotation(0, ratio);
  719. var _startratio = GD.getRatioWithRotation(3.68201217139115, ratio),
  720. _endratio = GD.getRatioWithRotation(0.540419517801362, ratio);
  721. for(var i=0;i<Lib_mmNode7_1points.length;i++){
  722. if(i%2==0){
  723. Lib_mmNode7_1compspts.push(Lib_mmNode7_1points[i]-Lib_mmNode7_1rect.x);
  724. }else{
  725. Lib_mmNode7_1compspts.push(Lib_mmNode7_1points[i]-Lib_mmNode7_1rect.y);
  726. }
  727. }
  728. var Lib_mmNode7_1ptslength=Lib_mmNode7_1compspts.length;
  729. if (Lib_mmNode7_1rect.height === 0) {
  730. Lib_mmNode7_1compspts[0] -= 0;
  731. Lib_mmNode7_1compspts[Lib_mmNode7_1ptslength-2] += 0;
  732. } else if (Lib_mmNode7_1rect.width === 0){
  733. Lib_mmNode7_1compspts[1] -= 0;
  734. Lib_mmNode7_1compspts[Lib_mmNode7_1ptslength-1] += 0;
  735. } else {
  736. Lib_mmNode7_1compspts[0] -= 0;
  737. Lib_mmNode7_1compspts[1] -= 0;
  738. Lib_mmNode7_1compspts[Lib_mmNode7_1ptslength-2] += 0;
  739. Lib_mmNode7_1compspts[Lib_mmNode7_1ptslength-1] += 0;
  740. }
  741. Lib_mmNode7_1 = new ht.Node();
  742. Lib_mmNode7_1.borderWidth = 2;
  743. Lib_mmNode7_1rect.width = Lib_mmNode7_1rect.width === 0 ? 0.0001 : Lib_mmNode7_1rect.width;
  744. Lib_mmNode7_1rect.height = Lib_mmNode7_1rect.height === 0 ? 0.0001 : Lib_mmNode7_1rect.height;
  745. var Lib_mmNode7_1endCompspts = [Lib_mmNode7_1compspts[Lib_mmNode7_1ptslength-2],Lib_mmNode7_1compspts[Lib_mmNode7_1ptslength-1],0,0];
  746. var Lib_mmNode7_1startCompspts = [Lib_mmNode7_1compspts[0],Lib_mmNode7_1compspts[1],0,0];
  747. Lib_mmNode7_1.setImage(GD.getPolyLineJSON());
  748. Lib_mmNode7_1.setPosition(Lib_mmNode7_1rect.x+Lib_mmNode7_1rect.width/2,Lib_mmNode7_1rect.y+Lib_mmNode7_1rect.height/2);
  749. Lib_mmNode7_1.setSize(Lib_mmNode7_1rect.width,Lib_mmNode7_1rect.height);
  750. Lib_mmNode7_1.setStyle("opacity",1);
  751. Lib_mmNode7_1.s({'pixelPerfect':true});
  752. Lib_mmNode7_1borderwidth=2;
  753. Lib_mmNode7_1.setRotation(0);
  754. dataModel.add(Lib_mmNode7_1);
  755. Lib_mmNode7_1.a('node.points',Lib_mmNode7_1compspts);
  756. Lib_mmNode7_1.a('node.segments',[1,2]);
  757. Lib_mmNode7_1.a('node.color','rgba(255,0,255,1)');
  758. Lib_mmNode7_1.a('node.borderPattern',getDashStyle("@borderPattern@"));
  759. Lib_mmNode7_1.a('node.borderColor','rgba(255,0,255,1)');
  760. Lib_mmNode7_1.a('node.background','rgba(255,0,255,1)');
  761. Lib_mmNode7_1.a('node.gradient','');
  762. Lib_mmNode7_1.a('node.gradientcolor','rgba(255,0,255,1)');
  763. Lib_mmNode7_1.a('node.endCompspts',Lib_mmNode7_1endCompspts);
  764. Lib_mmNode7_1.a('node.startCompspts',Lib_mmNode7_1startCompspts);
  765. (function (node, img, compspts, endCompspts, startCompspts) {
  766. var position = node.getPosition(),
  767. w = node.getWidth()*_ratio.ratioX,
  768. h = node.getHeight()*_ratio.ratioY;
  769. function resetPoints(rx, ry) {
  770. for (var i = 0, len = compspts.length; i < len; i++) {
  771. if (i%2 === 0) {
  772. compspts[i]*=rx;
  773. } else {
  774. compspts[i]*=ry;
  775. }
  776. }
  777. endCompspts[0] = compspts[compspts.length-2];
  778. endCompspts[1] = compspts[compspts.length-1];
  779. endCompspts[2] *= rx;
  780. endCompspts[3] *= ry;
  781. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  782. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  783. startCompspts[0] = compspts[0];
  784. startCompspts[1] = compspts[1];
  785. startCompspts[2] *= rx;
  786. startCompspts[3] *= ry;
  787. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  788. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  789. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  790. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  791. }
  792. node.setSize(w, h);
  793. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  794. node.a('node.width', w);
  795. node.a('node.height', h);
  796. resetPoints(_ratio.ratioX, _ratio.ratioY);
  797. node.borderWidth = 2;
  798. node.a('node.borderwidth',node.borderWidth);
  799. node._nodename = 'Lib_mmNode7_1';
  800. node._nodeType = 'line';
  801. zoomNodeList.push({
  802. node: node,
  803. attr: 'node.borderwidth'
  804. });
  805. var setWidth = node.setWidth,
  806. setHeight = node.setHeight,
  807. timer, rx = 1, ry = 1;
  808. node.setWidth = function (width) {
  809. var _width = this.getWidth();
  810. rx = width / _width;
  811. node.a('node.width', width);
  812. setWidth.apply(this, arguments);
  813. resetPoints(rx, 1);
  814. }
  815. node.setHeight = function (height) {
  816. var _height = this.getHeight();
  817. ry = height / _height;
  818. node.a('node.height', height);
  819. setHeight.apply(this, arguments);
  820. resetPoints(1, ry);
  821. }
  822. })(Lib_mmNode7_1, Lib_mmNode7_1.getImage(), Lib_mmNode7_1compspts, Lib_mmNode7_1endCompspts, Lib_mmNode7_1startCompspts);
  823. var Lib_mmNode7_2points=[27, 8,22, 11],
  824. Lib_mmNode7_2rect=ht.Default.unionPoint([{x:27,y:8},{x:22,y:11}]),
  825. Lib_mmNode7_2compspts=[];
  826. _ratio = GD.getRatioWithRotation(0, ratio);
  827. var _startratio = GD.getRatioWithRotation(-0.540419517801362, ratio),
  828. _endratio = GD.getRatioWithRotation(2.60117313578843, ratio);
  829. for(var i=0;i<Lib_mmNode7_2points.length;i++){
  830. if(i%2==0){
  831. Lib_mmNode7_2compspts.push(Lib_mmNode7_2points[i]-Lib_mmNode7_2rect.x);
  832. }else{
  833. Lib_mmNode7_2compspts.push(Lib_mmNode7_2points[i]-Lib_mmNode7_2rect.y);
  834. }
  835. }
  836. var Lib_mmNode7_2ptslength=Lib_mmNode7_2compspts.length;
  837. if (Lib_mmNode7_2rect.height === 0) {
  838. Lib_mmNode7_2compspts[0] -= 0;
  839. Lib_mmNode7_2compspts[Lib_mmNode7_2ptslength-2] += 0;
  840. } else if (Lib_mmNode7_2rect.width === 0){
  841. Lib_mmNode7_2compspts[1] -= 0;
  842. Lib_mmNode7_2compspts[Lib_mmNode7_2ptslength-1] += 0;
  843. } else {
  844. Lib_mmNode7_2compspts[0] -= 0;
  845. Lib_mmNode7_2compspts[1] -= 0;
  846. Lib_mmNode7_2compspts[Lib_mmNode7_2ptslength-2] += 0;
  847. Lib_mmNode7_2compspts[Lib_mmNode7_2ptslength-1] += 0;
  848. }
  849. Lib_mmNode7_2 = new ht.Node();
  850. Lib_mmNode7_2.borderWidth = 2;
  851. Lib_mmNode7_2rect.width = Lib_mmNode7_2rect.width === 0 ? 0.0001 : Lib_mmNode7_2rect.width;
  852. Lib_mmNode7_2rect.height = Lib_mmNode7_2rect.height === 0 ? 0.0001 : Lib_mmNode7_2rect.height;
  853. var Lib_mmNode7_2endCompspts = [Lib_mmNode7_2compspts[Lib_mmNode7_2ptslength-2],Lib_mmNode7_2compspts[Lib_mmNode7_2ptslength-1],0,0];
  854. var Lib_mmNode7_2startCompspts = [Lib_mmNode7_2compspts[0],Lib_mmNode7_2compspts[1],0,0];
  855. Lib_mmNode7_2.setImage(GD.getPolyLineJSON());
  856. Lib_mmNode7_2.setPosition(Lib_mmNode7_2rect.x+Lib_mmNode7_2rect.width/2,Lib_mmNode7_2rect.y+Lib_mmNode7_2rect.height/2);
  857. Lib_mmNode7_2.setSize(Lib_mmNode7_2rect.width,Lib_mmNode7_2rect.height);
  858. Lib_mmNode7_2.setStyle("opacity",1);
  859. Lib_mmNode7_2.s({'pixelPerfect':true});
  860. Lib_mmNode7_2borderwidth=2;
  861. Lib_mmNode7_2.setRotation(0);
  862. dataModel.add(Lib_mmNode7_2);
  863. Lib_mmNode7_2.a('node.points',Lib_mmNode7_2compspts);
  864. Lib_mmNode7_2.a('node.segments',[1,2]);
  865. Lib_mmNode7_2.a('node.color','rgba(255,0,255,1)');
  866. Lib_mmNode7_2.a('node.borderPattern',getDashStyle("@borderPattern@"));
  867. Lib_mmNode7_2.a('node.borderColor','rgba(255,0,255,1)');
  868. Lib_mmNode7_2.a('node.background','rgba(255,0,255,1)');
  869. Lib_mmNode7_2.a('node.gradient','');
  870. Lib_mmNode7_2.a('node.gradientcolor','rgba(255,0,255,1)');
  871. Lib_mmNode7_2.a('node.endCompspts',Lib_mmNode7_2endCompspts);
  872. Lib_mmNode7_2.a('node.startCompspts',Lib_mmNode7_2startCompspts);
  873. (function (node, img, compspts, endCompspts, startCompspts) {
  874. var position = node.getPosition(),
  875. w = node.getWidth()*_ratio.ratioX,
  876. h = node.getHeight()*_ratio.ratioY;
  877. function resetPoints(rx, ry) {
  878. for (var i = 0, len = compspts.length; i < len; i++) {
  879. if (i%2 === 0) {
  880. compspts[i]*=rx;
  881. } else {
  882. compspts[i]*=ry;
  883. }
  884. }
  885. endCompspts[0] = compspts[compspts.length-2];
  886. endCompspts[1] = compspts[compspts.length-1];
  887. endCompspts[2] *= rx;
  888. endCompspts[3] *= ry;
  889. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  890. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  891. startCompspts[0] = compspts[0];
  892. startCompspts[1] = compspts[1];
  893. startCompspts[2] *= rx;
  894. startCompspts[3] *= ry;
  895. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  896. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  897. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  898. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  899. }
  900. node.setSize(w, h);
  901. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  902. node.a('node.width', w);
  903. node.a('node.height', h);
  904. resetPoints(_ratio.ratioX, _ratio.ratioY);
  905. node.borderWidth = 2;
  906. node.a('node.borderwidth',node.borderWidth);
  907. node._nodename = 'Lib_mmNode7_2';
  908. node._nodeType = 'line';
  909. zoomNodeList.push({
  910. node: node,
  911. attr: 'node.borderwidth'
  912. });
  913. var setWidth = node.setWidth,
  914. setHeight = node.setHeight,
  915. timer, rx = 1, ry = 1;
  916. node.setWidth = function (width) {
  917. var _width = this.getWidth();
  918. rx = width / _width;
  919. node.a('node.width', width);
  920. setWidth.apply(this, arguments);
  921. resetPoints(rx, 1);
  922. }
  923. node.setHeight = function (height) {
  924. var _height = this.getHeight();
  925. ry = height / _height;
  926. node.a('node.height', height);
  927. setHeight.apply(this, arguments);
  928. resetPoints(1, ry);
  929. }
  930. })(Lib_mmNode7_2, Lib_mmNode7_2.getImage(), Lib_mmNode7_2compspts, Lib_mmNode7_2endCompspts, Lib_mmNode7_2startCompspts);
  931. var Lib_mmNode8_0points=[10, 4,10, 9],
  932. Lib_mmNode8_0rect=ht.Default.unionPoint([{x:10,y:4},{x:10,y:9}]),
  933. Lib_mmNode8_0compspts=[];
  934. _ratio = GD.getRatioWithRotation(0, ratio);
  935. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  936. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  937. for(var i=0;i<Lib_mmNode8_0points.length;i++){
  938. if(i%2==0){
  939. Lib_mmNode8_0compspts.push(Lib_mmNode8_0points[i]-Lib_mmNode8_0rect.x);
  940. }else{
  941. Lib_mmNode8_0compspts.push(Lib_mmNode8_0points[i]-Lib_mmNode8_0rect.y);
  942. }
  943. }
  944. var Lib_mmNode8_0ptslength=Lib_mmNode8_0compspts.length;
  945. if (Lib_mmNode8_0rect.height === 0) {
  946. Lib_mmNode8_0compspts[0] -= 0;
  947. Lib_mmNode8_0compspts[Lib_mmNode8_0ptslength-2] += 0;
  948. } else if (Lib_mmNode8_0rect.width === 0){
  949. Lib_mmNode8_0compspts[1] -= 0;
  950. Lib_mmNode8_0compspts[Lib_mmNode8_0ptslength-1] += 0;
  951. } else {
  952. Lib_mmNode8_0compspts[0] -= 0;
  953. Lib_mmNode8_0compspts[1] -= 0;
  954. Lib_mmNode8_0compspts[Lib_mmNode8_0ptslength-2] += 0;
  955. Lib_mmNode8_0compspts[Lib_mmNode8_0ptslength-1] += 0;
  956. }
  957. Lib_mmNode8_0 = new ht.Node();
  958. Lib_mmNode8_0.borderWidth = 2;
  959. Lib_mmNode8_0rect.width = Lib_mmNode8_0rect.width === 0 ? 0.0001 : Lib_mmNode8_0rect.width;
  960. Lib_mmNode8_0rect.height = Lib_mmNode8_0rect.height === 0 ? 0.0001 : Lib_mmNode8_0rect.height;
  961. var Lib_mmNode8_0endCompspts = [Lib_mmNode8_0compspts[Lib_mmNode8_0ptslength-2],Lib_mmNode8_0compspts[Lib_mmNode8_0ptslength-1],0,0];
  962. var Lib_mmNode8_0startCompspts = [Lib_mmNode8_0compspts[0],Lib_mmNode8_0compspts[1],0,0];
  963. Lib_mmNode8_0.setImage(GD.getPolyLineJSON());
  964. Lib_mmNode8_0.setPosition(Lib_mmNode8_0rect.x+Lib_mmNode8_0rect.width/2,Lib_mmNode8_0rect.y+Lib_mmNode8_0rect.height/2);
  965. Lib_mmNode8_0.setSize(Lib_mmNode8_0rect.width,Lib_mmNode8_0rect.height);
  966. Lib_mmNode8_0.setStyle("opacity",1);
  967. Lib_mmNode8_0.s({'pixelPerfect':true});
  968. Lib_mmNode8_0borderwidth=2;
  969. Lib_mmNode8_0.setRotation(0);
  970. dataModel.add(Lib_mmNode8_0);
  971. Lib_mmNode8_0.a('node.points',Lib_mmNode8_0compspts);
  972. Lib_mmNode8_0.a('node.segments',[1,2]);
  973. Lib_mmNode8_0.a('node.color','rgba(255,0,255,1)');
  974. Lib_mmNode8_0.a('node.borderPattern',getDashStyle("@borderPattern@"));
  975. Lib_mmNode8_0.a('node.borderColor','rgba(255,0,255,1)');
  976. Lib_mmNode8_0.a('node.background','rgba(255,0,255,1)');
  977. Lib_mmNode8_0.a('node.gradient','');
  978. Lib_mmNode8_0.a('node.gradientcolor','rgba(255,0,255,1)');
  979. Lib_mmNode8_0.a('node.endCompspts',Lib_mmNode8_0endCompspts);
  980. Lib_mmNode8_0.a('node.startCompspts',Lib_mmNode8_0startCompspts);
  981. (function (node, img, compspts, endCompspts, startCompspts) {
  982. var position = node.getPosition(),
  983. w = node.getWidth()*_ratio.ratioX,
  984. h = node.getHeight()*_ratio.ratioY;
  985. function resetPoints(rx, ry) {
  986. for (var i = 0, len = compspts.length; i < len; i++) {
  987. if (i%2 === 0) {
  988. compspts[i]*=rx;
  989. } else {
  990. compspts[i]*=ry;
  991. }
  992. }
  993. endCompspts[0] = compspts[compspts.length-2];
  994. endCompspts[1] = compspts[compspts.length-1];
  995. endCompspts[2] *= rx;
  996. endCompspts[3] *= ry;
  997. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  998. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  999. startCompspts[0] = compspts[0];
  1000. startCompspts[1] = compspts[1];
  1001. startCompspts[2] *= rx;
  1002. startCompspts[3] *= ry;
  1003. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1004. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1005. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1006. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1007. }
  1008. node.setSize(w, h);
  1009. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1010. node.a('node.width', w);
  1011. node.a('node.height', h);
  1012. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1013. node.borderWidth = 2;
  1014. node.a('node.borderwidth',node.borderWidth);
  1015. node._nodename = 'Lib_mmNode8_0';
  1016. node._nodeType = 'line';
  1017. zoomNodeList.push({
  1018. node: node,
  1019. attr: 'node.borderwidth'
  1020. });
  1021. var setWidth = node.setWidth,
  1022. setHeight = node.setHeight,
  1023. timer, rx = 1, ry = 1;
  1024. node.setWidth = function (width) {
  1025. var _width = this.getWidth();
  1026. rx = width / _width;
  1027. node.a('node.width', width);
  1028. setWidth.apply(this, arguments);
  1029. resetPoints(rx, 1);
  1030. }
  1031. node.setHeight = function (height) {
  1032. var _height = this.getHeight();
  1033. ry = height / _height;
  1034. node.a('node.height', height);
  1035. setHeight.apply(this, arguments);
  1036. resetPoints(1, ry);
  1037. }
  1038. })(Lib_mmNode8_0, Lib_mmNode8_0.getImage(), Lib_mmNode8_0compspts, Lib_mmNode8_0endCompspts, Lib_mmNode8_0startCompspts);
  1039. var Lib_mmNode8_1points=[10, 9,15, 12],
  1040. Lib_mmNode8_1rect=ht.Default.unionPoint([{x:10,y:9},{x:15,y:12}]),
  1041. Lib_mmNode8_1compspts=[];
  1042. _ratio = GD.getRatioWithRotation(0, ratio);
  1043. var _startratio = GD.getRatioWithRotation(3.68201217139115, ratio),
  1044. _endratio = GD.getRatioWithRotation(0.540419517801362, ratio);
  1045. for(var i=0;i<Lib_mmNode8_1points.length;i++){
  1046. if(i%2==0){
  1047. Lib_mmNode8_1compspts.push(Lib_mmNode8_1points[i]-Lib_mmNode8_1rect.x);
  1048. }else{
  1049. Lib_mmNode8_1compspts.push(Lib_mmNode8_1points[i]-Lib_mmNode8_1rect.y);
  1050. }
  1051. }
  1052. var Lib_mmNode8_1ptslength=Lib_mmNode8_1compspts.length;
  1053. if (Lib_mmNode8_1rect.height === 0) {
  1054. Lib_mmNode8_1compspts[0] -= 0;
  1055. Lib_mmNode8_1compspts[Lib_mmNode8_1ptslength-2] += 0;
  1056. } else if (Lib_mmNode8_1rect.width === 0){
  1057. Lib_mmNode8_1compspts[1] -= 0;
  1058. Lib_mmNode8_1compspts[Lib_mmNode8_1ptslength-1] += 0;
  1059. } else {
  1060. Lib_mmNode8_1compspts[0] -= 0;
  1061. Lib_mmNode8_1compspts[1] -= 0;
  1062. Lib_mmNode8_1compspts[Lib_mmNode8_1ptslength-2] += 0;
  1063. Lib_mmNode8_1compspts[Lib_mmNode8_1ptslength-1] += 0;
  1064. }
  1065. Lib_mmNode8_1 = new ht.Node();
  1066. Lib_mmNode8_1.borderWidth = 2;
  1067. Lib_mmNode8_1rect.width = Lib_mmNode8_1rect.width === 0 ? 0.0001 : Lib_mmNode8_1rect.width;
  1068. Lib_mmNode8_1rect.height = Lib_mmNode8_1rect.height === 0 ? 0.0001 : Lib_mmNode8_1rect.height;
  1069. var Lib_mmNode8_1endCompspts = [Lib_mmNode8_1compspts[Lib_mmNode8_1ptslength-2],Lib_mmNode8_1compspts[Lib_mmNode8_1ptslength-1],0,0];
  1070. var Lib_mmNode8_1startCompspts = [Lib_mmNode8_1compspts[0],Lib_mmNode8_1compspts[1],0,0];
  1071. Lib_mmNode8_1.setImage(GD.getPolyLineJSON());
  1072. Lib_mmNode8_1.setPosition(Lib_mmNode8_1rect.x+Lib_mmNode8_1rect.width/2,Lib_mmNode8_1rect.y+Lib_mmNode8_1rect.height/2);
  1073. Lib_mmNode8_1.setSize(Lib_mmNode8_1rect.width,Lib_mmNode8_1rect.height);
  1074. Lib_mmNode8_1.setStyle("opacity",1);
  1075. Lib_mmNode8_1.s({'pixelPerfect':true});
  1076. Lib_mmNode8_1borderwidth=2;
  1077. Lib_mmNode8_1.setRotation(0);
  1078. dataModel.add(Lib_mmNode8_1);
  1079. Lib_mmNode8_1.a('node.points',Lib_mmNode8_1compspts);
  1080. Lib_mmNode8_1.a('node.segments',[1,2]);
  1081. Lib_mmNode8_1.a('node.color','rgba(255,0,255,1)');
  1082. Lib_mmNode8_1.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1083. Lib_mmNode8_1.a('node.borderColor','rgba(255,0,255,1)');
  1084. Lib_mmNode8_1.a('node.background','rgba(255,0,255,1)');
  1085. Lib_mmNode8_1.a('node.gradient','');
  1086. Lib_mmNode8_1.a('node.gradientcolor','rgba(255,0,255,1)');
  1087. Lib_mmNode8_1.a('node.endCompspts',Lib_mmNode8_1endCompspts);
  1088. Lib_mmNode8_1.a('node.startCompspts',Lib_mmNode8_1startCompspts);
  1089. (function (node, img, compspts, endCompspts, startCompspts) {
  1090. var position = node.getPosition(),
  1091. w = node.getWidth()*_ratio.ratioX,
  1092. h = node.getHeight()*_ratio.ratioY;
  1093. function resetPoints(rx, ry) {
  1094. for (var i = 0, len = compspts.length; i < len; i++) {
  1095. if (i%2 === 0) {
  1096. compspts[i]*=rx;
  1097. } else {
  1098. compspts[i]*=ry;
  1099. }
  1100. }
  1101. endCompspts[0] = compspts[compspts.length-2];
  1102. endCompspts[1] = compspts[compspts.length-1];
  1103. endCompspts[2] *= rx;
  1104. endCompspts[3] *= ry;
  1105. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1106. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1107. startCompspts[0] = compspts[0];
  1108. startCompspts[1] = compspts[1];
  1109. startCompspts[2] *= rx;
  1110. startCompspts[3] *= ry;
  1111. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1112. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1113. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1114. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1115. }
  1116. node.setSize(w, h);
  1117. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1118. node.a('node.width', w);
  1119. node.a('node.height', h);
  1120. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1121. node.borderWidth = 2;
  1122. node.a('node.borderwidth',node.borderWidth);
  1123. node._nodename = 'Lib_mmNode8_1';
  1124. node._nodeType = 'line';
  1125. zoomNodeList.push({
  1126. node: node,
  1127. attr: 'node.borderwidth'
  1128. });
  1129. var setWidth = node.setWidth,
  1130. setHeight = node.setHeight,
  1131. timer, rx = 1, ry = 1;
  1132. node.setWidth = function (width) {
  1133. var _width = this.getWidth();
  1134. rx = width / _width;
  1135. node.a('node.width', width);
  1136. setWidth.apply(this, arguments);
  1137. resetPoints(rx, 1);
  1138. }
  1139. node.setHeight = function (height) {
  1140. var _height = this.getHeight();
  1141. ry = height / _height;
  1142. node.a('node.height', height);
  1143. setHeight.apply(this, arguments);
  1144. resetPoints(1, ry);
  1145. }
  1146. })(Lib_mmNode8_1, Lib_mmNode8_1.getImage(), Lib_mmNode8_1compspts, Lib_mmNode8_1endCompspts, Lib_mmNode8_1startCompspts);
  1147. var Lib_mmNode8_2points=[10, 9,5, 12],
  1148. Lib_mmNode8_2rect=ht.Default.unionPoint([{x:10,y:9},{x:5,y:12}]),
  1149. Lib_mmNode8_2compspts=[];
  1150. _ratio = GD.getRatioWithRotation(0, ratio);
  1151. var _startratio = GD.getRatioWithRotation(-0.540419517801362, ratio),
  1152. _endratio = GD.getRatioWithRotation(2.60117313578843, ratio);
  1153. for(var i=0;i<Lib_mmNode8_2points.length;i++){
  1154. if(i%2==0){
  1155. Lib_mmNode8_2compspts.push(Lib_mmNode8_2points[i]-Lib_mmNode8_2rect.x);
  1156. }else{
  1157. Lib_mmNode8_2compspts.push(Lib_mmNode8_2points[i]-Lib_mmNode8_2rect.y);
  1158. }
  1159. }
  1160. var Lib_mmNode8_2ptslength=Lib_mmNode8_2compspts.length;
  1161. if (Lib_mmNode8_2rect.height === 0) {
  1162. Lib_mmNode8_2compspts[0] -= 0;
  1163. Lib_mmNode8_2compspts[Lib_mmNode8_2ptslength-2] += 0;
  1164. } else if (Lib_mmNode8_2rect.width === 0){
  1165. Lib_mmNode8_2compspts[1] -= 0;
  1166. Lib_mmNode8_2compspts[Lib_mmNode8_2ptslength-1] += 0;
  1167. } else {
  1168. Lib_mmNode8_2compspts[0] -= 0;
  1169. Lib_mmNode8_2compspts[1] -= 0;
  1170. Lib_mmNode8_2compspts[Lib_mmNode8_2ptslength-2] += 0;
  1171. Lib_mmNode8_2compspts[Lib_mmNode8_2ptslength-1] += 0;
  1172. }
  1173. Lib_mmNode8_2 = new ht.Node();
  1174. Lib_mmNode8_2.borderWidth = 2;
  1175. Lib_mmNode8_2rect.width = Lib_mmNode8_2rect.width === 0 ? 0.0001 : Lib_mmNode8_2rect.width;
  1176. Lib_mmNode8_2rect.height = Lib_mmNode8_2rect.height === 0 ? 0.0001 : Lib_mmNode8_2rect.height;
  1177. var Lib_mmNode8_2endCompspts = [Lib_mmNode8_2compspts[Lib_mmNode8_2ptslength-2],Lib_mmNode8_2compspts[Lib_mmNode8_2ptslength-1],0,0];
  1178. var Lib_mmNode8_2startCompspts = [Lib_mmNode8_2compspts[0],Lib_mmNode8_2compspts[1],0,0];
  1179. Lib_mmNode8_2.setImage(GD.getPolyLineJSON());
  1180. Lib_mmNode8_2.setPosition(Lib_mmNode8_2rect.x+Lib_mmNode8_2rect.width/2,Lib_mmNode8_2rect.y+Lib_mmNode8_2rect.height/2);
  1181. Lib_mmNode8_2.setSize(Lib_mmNode8_2rect.width,Lib_mmNode8_2rect.height);
  1182. Lib_mmNode8_2.setStyle("opacity",1);
  1183. Lib_mmNode8_2.s({'pixelPerfect':true});
  1184. Lib_mmNode8_2borderwidth=2;
  1185. Lib_mmNode8_2.setRotation(0);
  1186. dataModel.add(Lib_mmNode8_2);
  1187. Lib_mmNode8_2.a('node.points',Lib_mmNode8_2compspts);
  1188. Lib_mmNode8_2.a('node.segments',[1,2]);
  1189. Lib_mmNode8_2.a('node.color','rgba(255,0,255,1)');
  1190. Lib_mmNode8_2.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1191. Lib_mmNode8_2.a('node.borderColor','rgba(255,0,255,1)');
  1192. Lib_mmNode8_2.a('node.background','rgba(255,0,255,1)');
  1193. Lib_mmNode8_2.a('node.gradient','');
  1194. Lib_mmNode8_2.a('node.gradientcolor','rgba(255,0,255,1)');
  1195. Lib_mmNode8_2.a('node.endCompspts',Lib_mmNode8_2endCompspts);
  1196. Lib_mmNode8_2.a('node.startCompspts',Lib_mmNode8_2startCompspts);
  1197. (function (node, img, compspts, endCompspts, startCompspts) {
  1198. var position = node.getPosition(),
  1199. w = node.getWidth()*_ratio.ratioX,
  1200. h = node.getHeight()*_ratio.ratioY;
  1201. function resetPoints(rx, ry) {
  1202. for (var i = 0, len = compspts.length; i < len; i++) {
  1203. if (i%2 === 0) {
  1204. compspts[i]*=rx;
  1205. } else {
  1206. compspts[i]*=ry;
  1207. }
  1208. }
  1209. endCompspts[0] = compspts[compspts.length-2];
  1210. endCompspts[1] = compspts[compspts.length-1];
  1211. endCompspts[2] *= rx;
  1212. endCompspts[3] *= ry;
  1213. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1214. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1215. startCompspts[0] = compspts[0];
  1216. startCompspts[1] = compspts[1];
  1217. startCompspts[2] *= rx;
  1218. startCompspts[3] *= ry;
  1219. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1220. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1221. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1222. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1223. }
  1224. node.setSize(w, h);
  1225. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1226. node.a('node.width', w);
  1227. node.a('node.height', h);
  1228. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1229. node.borderWidth = 2;
  1230. node.a('node.borderwidth',node.borderWidth);
  1231. node._nodename = 'Lib_mmNode8_2';
  1232. node._nodeType = 'line';
  1233. zoomNodeList.push({
  1234. node: node,
  1235. attr: 'node.borderwidth'
  1236. });
  1237. var setWidth = node.setWidth,
  1238. setHeight = node.setHeight,
  1239. timer, rx = 1, ry = 1;
  1240. node.setWidth = function (width) {
  1241. var _width = this.getWidth();
  1242. rx = width / _width;
  1243. node.a('node.width', width);
  1244. setWidth.apply(this, arguments);
  1245. resetPoints(rx, 1);
  1246. }
  1247. node.setHeight = function (height) {
  1248. var _height = this.getHeight();
  1249. ry = height / _height;
  1250. node.a('node.height', height);
  1251. setHeight.apply(this, arguments);
  1252. resetPoints(1, ry);
  1253. }
  1254. })(Lib_mmNode8_2, Lib_mmNode8_2.getImage(), Lib_mmNode8_2compspts, Lib_mmNode8_2endCompspts, Lib_mmNode8_2startCompspts);
  1255. var Lib_mmNode9_0points=[10, 18,10, 23],
  1256. Lib_mmNode9_0rect=ht.Default.unionPoint([{x:10,y:18},{x:10,y:23}]),
  1257. Lib_mmNode9_0compspts=[];
  1258. _ratio = GD.getRatioWithRotation(0, ratio);
  1259. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  1260. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  1261. for(var i=0;i<Lib_mmNode9_0points.length;i++){
  1262. if(i%2==0){
  1263. Lib_mmNode9_0compspts.push(Lib_mmNode9_0points[i]-Lib_mmNode9_0rect.x);
  1264. }else{
  1265. Lib_mmNode9_0compspts.push(Lib_mmNode9_0points[i]-Lib_mmNode9_0rect.y);
  1266. }
  1267. }
  1268. var Lib_mmNode9_0ptslength=Lib_mmNode9_0compspts.length;
  1269. if (Lib_mmNode9_0rect.height === 0) {
  1270. Lib_mmNode9_0compspts[0] -= 0;
  1271. Lib_mmNode9_0compspts[Lib_mmNode9_0ptslength-2] += 0;
  1272. } else if (Lib_mmNode9_0rect.width === 0){
  1273. Lib_mmNode9_0compspts[1] -= 0;
  1274. Lib_mmNode9_0compspts[Lib_mmNode9_0ptslength-1] += 0;
  1275. } else {
  1276. Lib_mmNode9_0compspts[0] -= 0;
  1277. Lib_mmNode9_0compspts[1] -= 0;
  1278. Lib_mmNode9_0compspts[Lib_mmNode9_0ptslength-2] += 0;
  1279. Lib_mmNode9_0compspts[Lib_mmNode9_0ptslength-1] += 0;
  1280. }
  1281. Lib_mmNode9_0 = new ht.Node();
  1282. Lib_mmNode9_0.borderWidth = 2;
  1283. Lib_mmNode9_0rect.width = Lib_mmNode9_0rect.width === 0 ? 0.0001 : Lib_mmNode9_0rect.width;
  1284. Lib_mmNode9_0rect.height = Lib_mmNode9_0rect.height === 0 ? 0.0001 : Lib_mmNode9_0rect.height;
  1285. var Lib_mmNode9_0endCompspts = [Lib_mmNode9_0compspts[Lib_mmNode9_0ptslength-2],Lib_mmNode9_0compspts[Lib_mmNode9_0ptslength-1],0,0];
  1286. var Lib_mmNode9_0startCompspts = [Lib_mmNode9_0compspts[0],Lib_mmNode9_0compspts[1],0,0];
  1287. Lib_mmNode9_0.setImage(GD.getPolyLineJSON());
  1288. Lib_mmNode9_0.setPosition(Lib_mmNode9_0rect.x+Lib_mmNode9_0rect.width/2,Lib_mmNode9_0rect.y+Lib_mmNode9_0rect.height/2);
  1289. Lib_mmNode9_0.setSize(Lib_mmNode9_0rect.width,Lib_mmNode9_0rect.height);
  1290. Lib_mmNode9_0.setStyle("opacity",1);
  1291. Lib_mmNode9_0.s({'pixelPerfect':true});
  1292. Lib_mmNode9_0borderwidth=2;
  1293. Lib_mmNode9_0.setRotation(0);
  1294. dataModel.add(Lib_mmNode9_0);
  1295. Lib_mmNode9_0.a('node.points',Lib_mmNode9_0compspts);
  1296. Lib_mmNode9_0.a('node.segments',[1,2]);
  1297. Lib_mmNode9_0.a('node.color','rgba(255,0,255,1)');
  1298. Lib_mmNode9_0.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1299. Lib_mmNode9_0.a('node.borderColor','rgba(255,0,255,1)');
  1300. Lib_mmNode9_0.a('node.background','rgba(255,0,255,1)');
  1301. Lib_mmNode9_0.a('node.gradient','');
  1302. Lib_mmNode9_0.a('node.gradientcolor','rgba(255,0,255,1)');
  1303. Lib_mmNode9_0.a('node.endCompspts',Lib_mmNode9_0endCompspts);
  1304. Lib_mmNode9_0.a('node.startCompspts',Lib_mmNode9_0startCompspts);
  1305. (function (node, img, compspts, endCompspts, startCompspts) {
  1306. var position = node.getPosition(),
  1307. w = node.getWidth()*_ratio.ratioX,
  1308. h = node.getHeight()*_ratio.ratioY;
  1309. function resetPoints(rx, ry) {
  1310. for (var i = 0, len = compspts.length; i < len; i++) {
  1311. if (i%2 === 0) {
  1312. compspts[i]*=rx;
  1313. } else {
  1314. compspts[i]*=ry;
  1315. }
  1316. }
  1317. endCompspts[0] = compspts[compspts.length-2];
  1318. endCompspts[1] = compspts[compspts.length-1];
  1319. endCompspts[2] *= rx;
  1320. endCompspts[3] *= ry;
  1321. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1322. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1323. startCompspts[0] = compspts[0];
  1324. startCompspts[1] = compspts[1];
  1325. startCompspts[2] *= rx;
  1326. startCompspts[3] *= ry;
  1327. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1328. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1329. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1330. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1331. }
  1332. node.setSize(w, h);
  1333. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1334. node.a('node.width', w);
  1335. node.a('node.height', h);
  1336. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1337. node.borderWidth = 2;
  1338. node.a('node.borderwidth',node.borderWidth);
  1339. node._nodename = 'Lib_mmNode9_0';
  1340. node._nodeType = 'line';
  1341. zoomNodeList.push({
  1342. node: node,
  1343. attr: 'node.borderwidth'
  1344. });
  1345. var setWidth = node.setWidth,
  1346. setHeight = node.setHeight,
  1347. timer, rx = 1, ry = 1;
  1348. node.setWidth = function (width) {
  1349. var _width = this.getWidth();
  1350. rx = width / _width;
  1351. node.a('node.width', width);
  1352. setWidth.apply(this, arguments);
  1353. resetPoints(rx, 1);
  1354. }
  1355. node.setHeight = function (height) {
  1356. var _height = this.getHeight();
  1357. ry = height / _height;
  1358. node.a('node.height', height);
  1359. setHeight.apply(this, arguments);
  1360. resetPoints(1, ry);
  1361. }
  1362. })(Lib_mmNode9_0, Lib_mmNode9_0.getImage(), Lib_mmNode9_0compspts, Lib_mmNode9_0endCompspts, Lib_mmNode9_0startCompspts);
  1363. var Lib_mmNode9_1points=[10, 23,15, 26],
  1364. Lib_mmNode9_1rect=ht.Default.unionPoint([{x:10,y:23},{x:15,y:26}]),
  1365. Lib_mmNode9_1compspts=[];
  1366. _ratio = GD.getRatioWithRotation(0, ratio);
  1367. var _startratio = GD.getRatioWithRotation(3.68201217139115, ratio),
  1368. _endratio = GD.getRatioWithRotation(0.540419517801362, ratio);
  1369. for(var i=0;i<Lib_mmNode9_1points.length;i++){
  1370. if(i%2==0){
  1371. Lib_mmNode9_1compspts.push(Lib_mmNode9_1points[i]-Lib_mmNode9_1rect.x);
  1372. }else{
  1373. Lib_mmNode9_1compspts.push(Lib_mmNode9_1points[i]-Lib_mmNode9_1rect.y);
  1374. }
  1375. }
  1376. var Lib_mmNode9_1ptslength=Lib_mmNode9_1compspts.length;
  1377. if (Lib_mmNode9_1rect.height === 0) {
  1378. Lib_mmNode9_1compspts[0] -= 0;
  1379. Lib_mmNode9_1compspts[Lib_mmNode9_1ptslength-2] += 0;
  1380. } else if (Lib_mmNode9_1rect.width === 0){
  1381. Lib_mmNode9_1compspts[1] -= 0;
  1382. Lib_mmNode9_1compspts[Lib_mmNode9_1ptslength-1] += 0;
  1383. } else {
  1384. Lib_mmNode9_1compspts[0] -= 0;
  1385. Lib_mmNode9_1compspts[1] -= 0;
  1386. Lib_mmNode9_1compspts[Lib_mmNode9_1ptslength-2] += 0;
  1387. Lib_mmNode9_1compspts[Lib_mmNode9_1ptslength-1] += 0;
  1388. }
  1389. Lib_mmNode9_1 = new ht.Node();
  1390. Lib_mmNode9_1.borderWidth = 2;
  1391. Lib_mmNode9_1rect.width = Lib_mmNode9_1rect.width === 0 ? 0.0001 : Lib_mmNode9_1rect.width;
  1392. Lib_mmNode9_1rect.height = Lib_mmNode9_1rect.height === 0 ? 0.0001 : Lib_mmNode9_1rect.height;
  1393. var Lib_mmNode9_1endCompspts = [Lib_mmNode9_1compspts[Lib_mmNode9_1ptslength-2],Lib_mmNode9_1compspts[Lib_mmNode9_1ptslength-1],0,0];
  1394. var Lib_mmNode9_1startCompspts = [Lib_mmNode9_1compspts[0],Lib_mmNode9_1compspts[1],0,0];
  1395. Lib_mmNode9_1.setImage(GD.getPolyLineJSON());
  1396. Lib_mmNode9_1.setPosition(Lib_mmNode9_1rect.x+Lib_mmNode9_1rect.width/2,Lib_mmNode9_1rect.y+Lib_mmNode9_1rect.height/2);
  1397. Lib_mmNode9_1.setSize(Lib_mmNode9_1rect.width,Lib_mmNode9_1rect.height);
  1398. Lib_mmNode9_1.setStyle("opacity",1);
  1399. Lib_mmNode9_1.s({'pixelPerfect':true});
  1400. Lib_mmNode9_1borderwidth=2;
  1401. Lib_mmNode9_1.setRotation(0);
  1402. dataModel.add(Lib_mmNode9_1);
  1403. Lib_mmNode9_1.a('node.points',Lib_mmNode9_1compspts);
  1404. Lib_mmNode9_1.a('node.segments',[1,2]);
  1405. Lib_mmNode9_1.a('node.color','rgba(255,0,255,1)');
  1406. Lib_mmNode9_1.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1407. Lib_mmNode9_1.a('node.borderColor','rgba(255,0,255,1)');
  1408. Lib_mmNode9_1.a('node.background','rgba(255,0,255,1)');
  1409. Lib_mmNode9_1.a('node.gradient','');
  1410. Lib_mmNode9_1.a('node.gradientcolor','rgba(255,0,255,1)');
  1411. Lib_mmNode9_1.a('node.endCompspts',Lib_mmNode9_1endCompspts);
  1412. Lib_mmNode9_1.a('node.startCompspts',Lib_mmNode9_1startCompspts);
  1413. (function (node, img, compspts, endCompspts, startCompspts) {
  1414. var position = node.getPosition(),
  1415. w = node.getWidth()*_ratio.ratioX,
  1416. h = node.getHeight()*_ratio.ratioY;
  1417. function resetPoints(rx, ry) {
  1418. for (var i = 0, len = compspts.length; i < len; i++) {
  1419. if (i%2 === 0) {
  1420. compspts[i]*=rx;
  1421. } else {
  1422. compspts[i]*=ry;
  1423. }
  1424. }
  1425. endCompspts[0] = compspts[compspts.length-2];
  1426. endCompspts[1] = compspts[compspts.length-1];
  1427. endCompspts[2] *= rx;
  1428. endCompspts[3] *= ry;
  1429. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1430. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1431. startCompspts[0] = compspts[0];
  1432. startCompspts[1] = compspts[1];
  1433. startCompspts[2] *= rx;
  1434. startCompspts[3] *= ry;
  1435. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1436. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1437. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1438. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1439. }
  1440. node.setSize(w, h);
  1441. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1442. node.a('node.width', w);
  1443. node.a('node.height', h);
  1444. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1445. node.borderWidth = 2;
  1446. node.a('node.borderwidth',node.borderWidth);
  1447. node._nodename = 'Lib_mmNode9_1';
  1448. node._nodeType = 'line';
  1449. zoomNodeList.push({
  1450. node: node,
  1451. attr: 'node.borderwidth'
  1452. });
  1453. var setWidth = node.setWidth,
  1454. setHeight = node.setHeight,
  1455. timer, rx = 1, ry = 1;
  1456. node.setWidth = function (width) {
  1457. var _width = this.getWidth();
  1458. rx = width / _width;
  1459. node.a('node.width', width);
  1460. setWidth.apply(this, arguments);
  1461. resetPoints(rx, 1);
  1462. }
  1463. node.setHeight = function (height) {
  1464. var _height = this.getHeight();
  1465. ry = height / _height;
  1466. node.a('node.height', height);
  1467. setHeight.apply(this, arguments);
  1468. resetPoints(1, ry);
  1469. }
  1470. })(Lib_mmNode9_1, Lib_mmNode9_1.getImage(), Lib_mmNode9_1compspts, Lib_mmNode9_1endCompspts, Lib_mmNode9_1startCompspts);
  1471. var Lib_mmNode9_2points=[10, 23,5, 26],
  1472. Lib_mmNode9_2rect=ht.Default.unionPoint([{x:10,y:23},{x:5,y:26}]),
  1473. Lib_mmNode9_2compspts=[];
  1474. _ratio = GD.getRatioWithRotation(0, ratio);
  1475. var _startratio = GD.getRatioWithRotation(-0.540419517801362, ratio),
  1476. _endratio = GD.getRatioWithRotation(2.60117313578843, ratio);
  1477. for(var i=0;i<Lib_mmNode9_2points.length;i++){
  1478. if(i%2==0){
  1479. Lib_mmNode9_2compspts.push(Lib_mmNode9_2points[i]-Lib_mmNode9_2rect.x);
  1480. }else{
  1481. Lib_mmNode9_2compspts.push(Lib_mmNode9_2points[i]-Lib_mmNode9_2rect.y);
  1482. }
  1483. }
  1484. var Lib_mmNode9_2ptslength=Lib_mmNode9_2compspts.length;
  1485. if (Lib_mmNode9_2rect.height === 0) {
  1486. Lib_mmNode9_2compspts[0] -= 0;
  1487. Lib_mmNode9_2compspts[Lib_mmNode9_2ptslength-2] += 0;
  1488. } else if (Lib_mmNode9_2rect.width === 0){
  1489. Lib_mmNode9_2compspts[1] -= 0;
  1490. Lib_mmNode9_2compspts[Lib_mmNode9_2ptslength-1] += 0;
  1491. } else {
  1492. Lib_mmNode9_2compspts[0] -= 0;
  1493. Lib_mmNode9_2compspts[1] -= 0;
  1494. Lib_mmNode9_2compspts[Lib_mmNode9_2ptslength-2] += 0;
  1495. Lib_mmNode9_2compspts[Lib_mmNode9_2ptslength-1] += 0;
  1496. }
  1497. Lib_mmNode9_2 = new ht.Node();
  1498. Lib_mmNode9_2.borderWidth = 2;
  1499. Lib_mmNode9_2rect.width = Lib_mmNode9_2rect.width === 0 ? 0.0001 : Lib_mmNode9_2rect.width;
  1500. Lib_mmNode9_2rect.height = Lib_mmNode9_2rect.height === 0 ? 0.0001 : Lib_mmNode9_2rect.height;
  1501. var Lib_mmNode9_2endCompspts = [Lib_mmNode9_2compspts[Lib_mmNode9_2ptslength-2],Lib_mmNode9_2compspts[Lib_mmNode9_2ptslength-1],0,0];
  1502. var Lib_mmNode9_2startCompspts = [Lib_mmNode9_2compspts[0],Lib_mmNode9_2compspts[1],0,0];
  1503. Lib_mmNode9_2.setImage(GD.getPolyLineJSON());
  1504. Lib_mmNode9_2.setPosition(Lib_mmNode9_2rect.x+Lib_mmNode9_2rect.width/2,Lib_mmNode9_2rect.y+Lib_mmNode9_2rect.height/2);
  1505. Lib_mmNode9_2.setSize(Lib_mmNode9_2rect.width,Lib_mmNode9_2rect.height);
  1506. Lib_mmNode9_2.setStyle("opacity",1);
  1507. Lib_mmNode9_2.s({'pixelPerfect':true});
  1508. Lib_mmNode9_2borderwidth=2;
  1509. Lib_mmNode9_2.setRotation(0);
  1510. dataModel.add(Lib_mmNode9_2);
  1511. Lib_mmNode9_2.a('node.points',Lib_mmNode9_2compspts);
  1512. Lib_mmNode9_2.a('node.segments',[1,2]);
  1513. Lib_mmNode9_2.a('node.color','rgba(255,0,255,1)');
  1514. Lib_mmNode9_2.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1515. Lib_mmNode9_2.a('node.borderColor','rgba(255,0,255,1)');
  1516. Lib_mmNode9_2.a('node.background','rgba(255,0,255,1)');
  1517. Lib_mmNode9_2.a('node.gradient','');
  1518. Lib_mmNode9_2.a('node.gradientcolor','rgba(255,0,255,1)');
  1519. Lib_mmNode9_2.a('node.endCompspts',Lib_mmNode9_2endCompspts);
  1520. Lib_mmNode9_2.a('node.startCompspts',Lib_mmNode9_2startCompspts);
  1521. (function (node, img, compspts, endCompspts, startCompspts) {
  1522. var position = node.getPosition(),
  1523. w = node.getWidth()*_ratio.ratioX,
  1524. h = node.getHeight()*_ratio.ratioY;
  1525. function resetPoints(rx, ry) {
  1526. for (var i = 0, len = compspts.length; i < len; i++) {
  1527. if (i%2 === 0) {
  1528. compspts[i]*=rx;
  1529. } else {
  1530. compspts[i]*=ry;
  1531. }
  1532. }
  1533. endCompspts[0] = compspts[compspts.length-2];
  1534. endCompspts[1] = compspts[compspts.length-1];
  1535. endCompspts[2] *= rx;
  1536. endCompspts[3] *= ry;
  1537. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1538. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1539. startCompspts[0] = compspts[0];
  1540. startCompspts[1] = compspts[1];
  1541. startCompspts[2] *= rx;
  1542. startCompspts[3] *= ry;
  1543. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1544. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1545. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1546. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1547. }
  1548. node.setSize(w, h);
  1549. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1550. node.a('node.width', w);
  1551. node.a('node.height', h);
  1552. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1553. node.borderWidth = 2;
  1554. node.a('node.borderwidth',node.borderWidth);
  1555. node._nodename = 'Lib_mmNode9_2';
  1556. node._nodeType = 'line';
  1557. zoomNodeList.push({
  1558. node: node,
  1559. attr: 'node.borderwidth'
  1560. });
  1561. var setWidth = node.setWidth,
  1562. setHeight = node.setHeight,
  1563. timer, rx = 1, ry = 1;
  1564. node.setWidth = function (width) {
  1565. var _width = this.getWidth();
  1566. rx = width / _width;
  1567. node.a('node.width', width);
  1568. setWidth.apply(this, arguments);
  1569. resetPoints(rx, 1);
  1570. }
  1571. node.setHeight = function (height) {
  1572. var _height = this.getHeight();
  1573. ry = height / _height;
  1574. node.a('node.height', height);
  1575. setHeight.apply(this, arguments);
  1576. resetPoints(1, ry);
  1577. }
  1578. })(Lib_mmNode9_2, Lib_mmNode9_2.getImage(), Lib_mmNode9_2compspts, Lib_mmNode9_2endCompspts, Lib_mmNode9_2startCompspts);
  1579. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  1580. var Lib_mmNode10type = 'oval';
  1581. var Lib_mmNode10 = new ht.Node(),
  1582. Lib_mmNode10BorderWidth = 2*2;
  1583. if (Lib_mmNode10type === 'arc') {
  1584. Lib_mmNode10BorderWidth *= 2;
  1585. }
  1586. Lib_mmNode10.setImage(GD.getRectJSON(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY, Lib_mmNode10type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  1587. Lib_mmNode10.setPosition(43*ratio.ratioX, 15*ratio.ratioY);
  1588. Lib_mmNode10.setSize(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY);
  1589. Lib_mmNode10.s({
  1590. 'pixelPerfect':true
  1591. /*@AddPara@*/
  1592. });
  1593. Lib_mmNode10.a('node.width', 19.99998*_ratio.ratioX);
  1594. Lib_mmNode10.a('node.height', 16.36363*_ratio.ratioY);
  1595. Lib_mmNode10.a('node.type', Lib_mmNode10type);
  1596. Lib_mmNode10.a('node.rect', [0, 0, 19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY]);
  1597. Lib_mmNode10.a('node.background', 'rgba(255,255,255,0.003921569)');
  1598. Lib_mmNode10.a('node.gradientcolor', '');
  1599. Lib_mmNode10.a('node.gradient', '');
  1600. Lib_mmNode10.a('node.borderwidth', Lib_mmNode10BorderWidth);
  1601. Lib_mmNode10.a('node.color', 'rgba(255,0,255,1)');
  1602. Lib_mmNode10.a('node.fillrect', [0,0,0,0]);
  1603. Lib_mmNode10.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  1604. Lib_mmNode10.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  1605. Lib_mmNode10.a('node.fillgradient', '');
  1606. if (Lib_mmNode10type !== 'rect') {
  1607. Lib_mmNode10.a('node.arcFrom', parseFloat('@arcFrom@'));
  1608. Lib_mmNode10.a('node.arcTo', parseFloat('@arcTo@'));
  1609. Lib_mmNode10.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  1610. }
  1611. if (Lib_mmNode10type === 'arc') {
  1612. Lib_mmNode10.a('node.arcOval', true);
  1613. }
  1614. Lib_mmNode10.setRotation(0*Math.PI/180);
  1615. Lib_mmNode10.borderWidth = Lib_mmNode10BorderWidth;
  1616. Lib_mmNode10.borderFillwidth = Lib_mmNode10BorderWidth;
  1617. dataModel.add(Lib_mmNode10);
  1618. Lib_mmNode10._nodename = 'Lib_mmNode10'
  1619. Lib_mmNode10._nodeType = 'rect';
  1620. zoomNodeList.push({
  1621. node: Lib_mmNode10,
  1622. attr: 'node.borderwidth'
  1623. });
  1624. (function (node, _img) {
  1625. var setWidth = node.setWidth,
  1626. setHeight = node.setHeight;
  1627. node.setWidth = function (width) {
  1628. if (width === this.getWidth()) return ;
  1629. var height = this.getHeight();
  1630. this.a('node.width', width);
  1631. this.a('node.rect', [0,0,width, height]);
  1632. setWidth.apply(this, arguments);
  1633. }
  1634. node.setHeight = function (height) {
  1635. if (height === this.getHeight()) return ;
  1636. var width = this.getWidth();
  1637. this.a('node.height', height);
  1638. this.a('node.rect', [0,0,width, height]);
  1639. setHeight.apply(this, arguments);
  1640. }
  1641. })(Lib_mmNode10, Lib_mmNode10.getImage());var Lib_mmNode11_0points=[40, 20,49, 15],
  1642. Lib_mmNode11_0rect=ht.Default.unionPoint([{x:40,y:20},{x:49,y:15}]),
  1643. Lib_mmNode11_0compspts=[];
  1644. _ratio = GD.getRatioWithRotation(0, ratio);
  1645. var _startratio = GD.getRatioWithRotation(2.63449412895437, ratio),
  1646. _endratio = GD.getRatioWithRotation(-0.507098524635424, ratio);
  1647. for(var i=0;i<Lib_mmNode11_0points.length;i++){
  1648. if(i%2==0){
  1649. Lib_mmNode11_0compspts.push(Lib_mmNode11_0points[i]-Lib_mmNode11_0rect.x);
  1650. }else{
  1651. Lib_mmNode11_0compspts.push(Lib_mmNode11_0points[i]-Lib_mmNode11_0rect.y);
  1652. }
  1653. }
  1654. var Lib_mmNode11_0ptslength=Lib_mmNode11_0compspts.length;
  1655. if (Lib_mmNode11_0rect.height === 0) {
  1656. Lib_mmNode11_0compspts[0] -= 0;
  1657. Lib_mmNode11_0compspts[Lib_mmNode11_0ptslength-2] += 0;
  1658. } else if (Lib_mmNode11_0rect.width === 0){
  1659. Lib_mmNode11_0compspts[1] -= 0;
  1660. Lib_mmNode11_0compspts[Lib_mmNode11_0ptslength-1] += 0;
  1661. } else {
  1662. Lib_mmNode11_0compspts[0] -= 0;
  1663. Lib_mmNode11_0compspts[1] -= 0;
  1664. Lib_mmNode11_0compspts[Lib_mmNode11_0ptslength-2] += 0;
  1665. Lib_mmNode11_0compspts[Lib_mmNode11_0ptslength-1] += 0;
  1666. }
  1667. Lib_mmNode11_0 = new ht.Node();
  1668. Lib_mmNode11_0.borderWidth = 2;
  1669. Lib_mmNode11_0rect.width = Lib_mmNode11_0rect.width === 0 ? 0.0001 : Lib_mmNode11_0rect.width;
  1670. Lib_mmNode11_0rect.height = Lib_mmNode11_0rect.height === 0 ? 0.0001 : Lib_mmNode11_0rect.height;
  1671. var Lib_mmNode11_0endCompspts = [Lib_mmNode11_0compspts[Lib_mmNode11_0ptslength-2],Lib_mmNode11_0compspts[Lib_mmNode11_0ptslength-1],0,0];
  1672. var Lib_mmNode11_0startCompspts = [Lib_mmNode11_0compspts[0],Lib_mmNode11_0compspts[1],0,0];
  1673. Lib_mmNode11_0.setImage(GD.getPolyLineJSON());
  1674. Lib_mmNode11_0.setPosition(Lib_mmNode11_0rect.x+Lib_mmNode11_0rect.width/2,Lib_mmNode11_0rect.y+Lib_mmNode11_0rect.height/2);
  1675. Lib_mmNode11_0.setSize(Lib_mmNode11_0rect.width,Lib_mmNode11_0rect.height);
  1676. Lib_mmNode11_0.setStyle("opacity",1);
  1677. Lib_mmNode11_0.s({'pixelPerfect':true});
  1678. Lib_mmNode11_0borderwidth=2;
  1679. Lib_mmNode11_0.setRotation(0);
  1680. dataModel.add(Lib_mmNode11_0);
  1681. Lib_mmNode11_0.a('node.points',Lib_mmNode11_0compspts);
  1682. Lib_mmNode11_0.a('node.segments',[1,2]);
  1683. Lib_mmNode11_0.a('node.color','rgba(255,0,255,1)');
  1684. Lib_mmNode11_0.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1685. Lib_mmNode11_0.a('node.borderColor','rgba(255,0,255,1)');
  1686. Lib_mmNode11_0.a('node.background','rgba(255,0,255,1)');
  1687. Lib_mmNode11_0.a('node.gradient','');
  1688. Lib_mmNode11_0.a('node.gradientcolor','rgba(255,0,255,1)');
  1689. Lib_mmNode11_0.a('node.endCompspts',Lib_mmNode11_0endCompspts);
  1690. Lib_mmNode11_0.a('node.startCompspts',Lib_mmNode11_0startCompspts);
  1691. (function (node, img, compspts, endCompspts, startCompspts) {
  1692. var position = node.getPosition(),
  1693. w = node.getWidth()*_ratio.ratioX,
  1694. h = node.getHeight()*_ratio.ratioY;
  1695. function resetPoints(rx, ry) {
  1696. for (var i = 0, len = compspts.length; i < len; i++) {
  1697. if (i%2 === 0) {
  1698. compspts[i]*=rx;
  1699. } else {
  1700. compspts[i]*=ry;
  1701. }
  1702. }
  1703. endCompspts[0] = compspts[compspts.length-2];
  1704. endCompspts[1] = compspts[compspts.length-1];
  1705. endCompspts[2] *= rx;
  1706. endCompspts[3] *= ry;
  1707. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1708. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1709. startCompspts[0] = compspts[0];
  1710. startCompspts[1] = compspts[1];
  1711. startCompspts[2] *= rx;
  1712. startCompspts[3] *= ry;
  1713. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1714. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1715. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1716. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1717. }
  1718. node.setSize(w, h);
  1719. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1720. node.a('node.width', w);
  1721. node.a('node.height', h);
  1722. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1723. node.borderWidth = 2;
  1724. node.a('node.borderwidth',node.borderWidth);
  1725. node._nodename = 'Lib_mmNode11_0';
  1726. node._nodeType = 'line';
  1727. zoomNodeList.push({
  1728. node: node,
  1729. attr: 'node.borderwidth'
  1730. });
  1731. var setWidth = node.setWidth,
  1732. setHeight = node.setHeight,
  1733. timer, rx = 1, ry = 1;
  1734. node.setWidth = function (width) {
  1735. var _width = this.getWidth();
  1736. rx = width / _width;
  1737. node.a('node.width', width);
  1738. setWidth.apply(this, arguments);
  1739. resetPoints(rx, 1);
  1740. }
  1741. node.setHeight = function (height) {
  1742. var _height = this.getHeight();
  1743. ry = height / _height;
  1744. node.a('node.height', height);
  1745. setHeight.apply(this, arguments);
  1746. resetPoints(1, ry);
  1747. }
  1748. })(Lib_mmNode11_0, Lib_mmNode11_0.getImage(), Lib_mmNode11_0compspts, Lib_mmNode11_0endCompspts, Lib_mmNode11_0startCompspts);
  1749. var Lib_mmNode11_1points=[40, 10,40, 20],
  1750. Lib_mmNode11_1rect=ht.Default.unionPoint([{x:40,y:10},{x:40,y:20}]),
  1751. Lib_mmNode11_1compspts=[];
  1752. _ratio = GD.getRatioWithRotation(0, ratio);
  1753. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  1754. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  1755. for(var i=0;i<Lib_mmNode11_1points.length;i++){
  1756. if(i%2==0){
  1757. Lib_mmNode11_1compspts.push(Lib_mmNode11_1points[i]-Lib_mmNode11_1rect.x);
  1758. }else{
  1759. Lib_mmNode11_1compspts.push(Lib_mmNode11_1points[i]-Lib_mmNode11_1rect.y);
  1760. }
  1761. }
  1762. var Lib_mmNode11_1ptslength=Lib_mmNode11_1compspts.length;
  1763. if (Lib_mmNode11_1rect.height === 0) {
  1764. Lib_mmNode11_1compspts[0] -= 0;
  1765. Lib_mmNode11_1compspts[Lib_mmNode11_1ptslength-2] += 0;
  1766. } else if (Lib_mmNode11_1rect.width === 0){
  1767. Lib_mmNode11_1compspts[1] -= 0;
  1768. Lib_mmNode11_1compspts[Lib_mmNode11_1ptslength-1] += 0;
  1769. } else {
  1770. Lib_mmNode11_1compspts[0] -= 0;
  1771. Lib_mmNode11_1compspts[1] -= 0;
  1772. Lib_mmNode11_1compspts[Lib_mmNode11_1ptslength-2] += 0;
  1773. Lib_mmNode11_1compspts[Lib_mmNode11_1ptslength-1] += 0;
  1774. }
  1775. Lib_mmNode11_1 = new ht.Node();
  1776. Lib_mmNode11_1.borderWidth = 2;
  1777. Lib_mmNode11_1rect.width = Lib_mmNode11_1rect.width === 0 ? 0.0001 : Lib_mmNode11_1rect.width;
  1778. Lib_mmNode11_1rect.height = Lib_mmNode11_1rect.height === 0 ? 0.0001 : Lib_mmNode11_1rect.height;
  1779. var Lib_mmNode11_1endCompspts = [Lib_mmNode11_1compspts[Lib_mmNode11_1ptslength-2],Lib_mmNode11_1compspts[Lib_mmNode11_1ptslength-1],0,0];
  1780. var Lib_mmNode11_1startCompspts = [Lib_mmNode11_1compspts[0],Lib_mmNode11_1compspts[1],0,0];
  1781. Lib_mmNode11_1.setImage(GD.getPolyLineJSON());
  1782. Lib_mmNode11_1.setPosition(Lib_mmNode11_1rect.x+Lib_mmNode11_1rect.width/2,Lib_mmNode11_1rect.y+Lib_mmNode11_1rect.height/2);
  1783. Lib_mmNode11_1.setSize(Lib_mmNode11_1rect.width,Lib_mmNode11_1rect.height);
  1784. Lib_mmNode11_1.setStyle("opacity",1);
  1785. Lib_mmNode11_1.s({'pixelPerfect':true});
  1786. Lib_mmNode11_1borderwidth=2;
  1787. Lib_mmNode11_1.setRotation(0);
  1788. dataModel.add(Lib_mmNode11_1);
  1789. Lib_mmNode11_1.a('node.points',Lib_mmNode11_1compspts);
  1790. Lib_mmNode11_1.a('node.segments',[1,2]);
  1791. Lib_mmNode11_1.a('node.color','rgba(255,0,255,1)');
  1792. Lib_mmNode11_1.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1793. Lib_mmNode11_1.a('node.borderColor','rgba(255,0,255,1)');
  1794. Lib_mmNode11_1.a('node.background','rgba(255,0,255,1)');
  1795. Lib_mmNode11_1.a('node.gradient','');
  1796. Lib_mmNode11_1.a('node.gradientcolor','rgba(255,0,255,1)');
  1797. Lib_mmNode11_1.a('node.endCompspts',Lib_mmNode11_1endCompspts);
  1798. Lib_mmNode11_1.a('node.startCompspts',Lib_mmNode11_1startCompspts);
  1799. (function (node, img, compspts, endCompspts, startCompspts) {
  1800. var position = node.getPosition(),
  1801. w = node.getWidth()*_ratio.ratioX,
  1802. h = node.getHeight()*_ratio.ratioY;
  1803. function resetPoints(rx, ry) {
  1804. for (var i = 0, len = compspts.length; i < len; i++) {
  1805. if (i%2 === 0) {
  1806. compspts[i]*=rx;
  1807. } else {
  1808. compspts[i]*=ry;
  1809. }
  1810. }
  1811. endCompspts[0] = compspts[compspts.length-2];
  1812. endCompspts[1] = compspts[compspts.length-1];
  1813. endCompspts[2] *= rx;
  1814. endCompspts[3] *= ry;
  1815. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1816. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1817. startCompspts[0] = compspts[0];
  1818. startCompspts[1] = compspts[1];
  1819. startCompspts[2] *= rx;
  1820. startCompspts[3] *= ry;
  1821. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1822. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1823. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1824. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1825. }
  1826. node.setSize(w, h);
  1827. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1828. node.a('node.width', w);
  1829. node.a('node.height', h);
  1830. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1831. node.borderWidth = 2;
  1832. node.a('node.borderwidth',node.borderWidth);
  1833. node._nodename = 'Lib_mmNode11_1';
  1834. node._nodeType = 'line';
  1835. zoomNodeList.push({
  1836. node: node,
  1837. attr: 'node.borderwidth'
  1838. });
  1839. var setWidth = node.setWidth,
  1840. setHeight = node.setHeight,
  1841. timer, rx = 1, ry = 1;
  1842. node.setWidth = function (width) {
  1843. var _width = this.getWidth();
  1844. rx = width / _width;
  1845. node.a('node.width', width);
  1846. setWidth.apply(this, arguments);
  1847. resetPoints(rx, 1);
  1848. }
  1849. node.setHeight = function (height) {
  1850. var _height = this.getHeight();
  1851. ry = height / _height;
  1852. node.a('node.height', height);
  1853. setHeight.apply(this, arguments);
  1854. resetPoints(1, ry);
  1855. }
  1856. })(Lib_mmNode11_1, Lib_mmNode11_1.getImage(), Lib_mmNode11_1compspts, Lib_mmNode11_1endCompspts, Lib_mmNode11_1startCompspts);
  1857. var Lib_mmNode11_2points=[41, 10,48, 15],
  1858. Lib_mmNode11_2rect=ht.Default.unionPoint([{x:41,y:10},{x:48,y:15}]),
  1859. Lib_mmNode11_2compspts=[];
  1860. _ratio = GD.getRatioWithRotation(0, ratio);
  1861. var _startratio = GD.getRatioWithRotation(3.76184215084917, ratio),
  1862. _endratio = GD.getRatioWithRotation(0.620249497259376, ratio);
  1863. for(var i=0;i<Lib_mmNode11_2points.length;i++){
  1864. if(i%2==0){
  1865. Lib_mmNode11_2compspts.push(Lib_mmNode11_2points[i]-Lib_mmNode11_2rect.x);
  1866. }else{
  1867. Lib_mmNode11_2compspts.push(Lib_mmNode11_2points[i]-Lib_mmNode11_2rect.y);
  1868. }
  1869. }
  1870. var Lib_mmNode11_2ptslength=Lib_mmNode11_2compspts.length;
  1871. if (Lib_mmNode11_2rect.height === 0) {
  1872. Lib_mmNode11_2compspts[0] -= 0;
  1873. Lib_mmNode11_2compspts[Lib_mmNode11_2ptslength-2] += 0;
  1874. } else if (Lib_mmNode11_2rect.width === 0){
  1875. Lib_mmNode11_2compspts[1] -= 0;
  1876. Lib_mmNode11_2compspts[Lib_mmNode11_2ptslength-1] += 0;
  1877. } else {
  1878. Lib_mmNode11_2compspts[0] -= 0;
  1879. Lib_mmNode11_2compspts[1] -= 0;
  1880. Lib_mmNode11_2compspts[Lib_mmNode11_2ptslength-2] += 0;
  1881. Lib_mmNode11_2compspts[Lib_mmNode11_2ptslength-1] += 0;
  1882. }
  1883. Lib_mmNode11_2 = new ht.Node();
  1884. Lib_mmNode11_2.borderWidth = 2;
  1885. Lib_mmNode11_2rect.width = Lib_mmNode11_2rect.width === 0 ? 0.0001 : Lib_mmNode11_2rect.width;
  1886. Lib_mmNode11_2rect.height = Lib_mmNode11_2rect.height === 0 ? 0.0001 : Lib_mmNode11_2rect.height;
  1887. var Lib_mmNode11_2endCompspts = [Lib_mmNode11_2compspts[Lib_mmNode11_2ptslength-2],Lib_mmNode11_2compspts[Lib_mmNode11_2ptslength-1],0,0];
  1888. var Lib_mmNode11_2startCompspts = [Lib_mmNode11_2compspts[0],Lib_mmNode11_2compspts[1],0,0];
  1889. Lib_mmNode11_2.setImage(GD.getPolyLineJSON());
  1890. Lib_mmNode11_2.setPosition(Lib_mmNode11_2rect.x+Lib_mmNode11_2rect.width/2,Lib_mmNode11_2rect.y+Lib_mmNode11_2rect.height/2);
  1891. Lib_mmNode11_2.setSize(Lib_mmNode11_2rect.width,Lib_mmNode11_2rect.height);
  1892. Lib_mmNode11_2.setStyle("opacity",1);
  1893. Lib_mmNode11_2.s({'pixelPerfect':true});
  1894. Lib_mmNode11_2borderwidth=2;
  1895. Lib_mmNode11_2.setRotation(0);
  1896. dataModel.add(Lib_mmNode11_2);
  1897. Lib_mmNode11_2.a('node.points',Lib_mmNode11_2compspts);
  1898. Lib_mmNode11_2.a('node.segments',[1,2]);
  1899. Lib_mmNode11_2.a('node.color','rgba(255,0,255,1)');
  1900. Lib_mmNode11_2.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1901. Lib_mmNode11_2.a('node.borderColor','rgba(255,0,255,1)');
  1902. Lib_mmNode11_2.a('node.background','rgba(255,0,255,1)');
  1903. Lib_mmNode11_2.a('node.gradient','');
  1904. Lib_mmNode11_2.a('node.gradientcolor','rgba(255,0,255,1)');
  1905. Lib_mmNode11_2.a('node.endCompspts',Lib_mmNode11_2endCompspts);
  1906. Lib_mmNode11_2.a('node.startCompspts',Lib_mmNode11_2startCompspts);
  1907. (function (node, img, compspts, endCompspts, startCompspts) {
  1908. var position = node.getPosition(),
  1909. w = node.getWidth()*_ratio.ratioX,
  1910. h = node.getHeight()*_ratio.ratioY;
  1911. function resetPoints(rx, ry) {
  1912. for (var i = 0, len = compspts.length; i < len; i++) {
  1913. if (i%2 === 0) {
  1914. compspts[i]*=rx;
  1915. } else {
  1916. compspts[i]*=ry;
  1917. }
  1918. }
  1919. endCompspts[0] = compspts[compspts.length-2];
  1920. endCompspts[1] = compspts[compspts.length-1];
  1921. endCompspts[2] *= rx;
  1922. endCompspts[3] *= ry;
  1923. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1924. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1925. startCompspts[0] = compspts[0];
  1926. startCompspts[1] = compspts[1];
  1927. startCompspts[2] *= rx;
  1928. startCompspts[3] *= ry;
  1929. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1930. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1931. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1932. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1933. }
  1934. node.setSize(w, h);
  1935. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1936. node.a('node.width', w);
  1937. node.a('node.height', h);
  1938. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1939. node.borderWidth = 2;
  1940. node.a('node.borderwidth',node.borderWidth);
  1941. node._nodename = 'Lib_mmNode11_2';
  1942. node._nodeType = 'line';
  1943. zoomNodeList.push({
  1944. node: node,
  1945. attr: 'node.borderwidth'
  1946. });
  1947. var setWidth = node.setWidth,
  1948. setHeight = node.setHeight,
  1949. timer, rx = 1, ry = 1;
  1950. node.setWidth = function (width) {
  1951. var _width = this.getWidth();
  1952. rx = width / _width;
  1953. node.a('node.width', width);
  1954. setWidth.apply(this, arguments);
  1955. resetPoints(rx, 1);
  1956. }
  1957. node.setHeight = function (height) {
  1958. var _height = this.getHeight();
  1959. ry = height / _height;
  1960. node.a('node.height', height);
  1961. setHeight.apply(this, arguments);
  1962. resetPoints(1, ry);
  1963. }
  1964. })(Lib_mmNode11_2, Lib_mmNode11_2.getImage(), Lib_mmNode11_2compspts, Lib_mmNode11_2endCompspts, Lib_mmNode11_2startCompspts);
  1965. /*@GraphList@*/
  1966. /*@PageInit@*/
  1967. var localVarObj = this.localVarObj;
  1968. var localDynamicVarObj = this.localDynamicVar();
  1969. this['Lib_mmNode0'] = Lib_mmNode0;
  1970. Lib_mmNode0.__parentLib = nodename;
  1971. Lib_mmNode0.__parent = this;
  1972. this.childNodes.push(Lib_mmNode0);
  1973. this['Lib_mmNode1'] = Lib_mmNode1;
  1974. Lib_mmNode1.__parentLib = nodename;
  1975. Lib_mmNode1.__parent = this;
  1976. this.childNodes.push(Lib_mmNode1);
  1977. this['Lib_mmNode2'] = Lib_mmNode2;
  1978. Lib_mmNode2.__parentLib = nodename;
  1979. Lib_mmNode2.__parent = this;
  1980. this.childNodes.push(Lib_mmNode2);
  1981. this['Lib_mmNode3'] = Lib_mmNode3;
  1982. Lib_mmNode3.__parentLib = nodename;
  1983. Lib_mmNode3.__parent = this;
  1984. this.childNodes.push(Lib_mmNode3);
  1985. this['Lib_mmNode4'] = Lib_mmNode4;
  1986. Lib_mmNode4.__parentLib = nodename;
  1987. Lib_mmNode4.__parent = this;
  1988. this.childNodes.push(Lib_mmNode4);
  1989. this['Lib_mmNode5'] = Lib_mmNode5;
  1990. Lib_mmNode5.__parentLib = nodename;
  1991. Lib_mmNode5.__parent = this;
  1992. this.childNodes.push(Lib_mmNode5);
  1993. this['Lib_mmNode6'] = Lib_mmNode6;
  1994. Lib_mmNode6.__parentLib = nodename;
  1995. Lib_mmNode6.__parent = this;
  1996. this.childNodes.push(Lib_mmNode6);
  1997. this['Lib_mmNode7_0'] = Lib_mmNode7_0;
  1998. Lib_mmNode7_0.__parentLib = nodename;
  1999. Lib_mmNode7_0.__parent = this;
  2000. this.childNodes.push(Lib_mmNode7_0);
  2001. this['Lib_mmNode7_1'] = Lib_mmNode7_1;
  2002. Lib_mmNode7_1.__parentLib = nodename;
  2003. Lib_mmNode7_1.__parent = this;
  2004. this.childNodes.push(Lib_mmNode7_1);
  2005. this['Lib_mmNode7_2'] = Lib_mmNode7_2;
  2006. Lib_mmNode7_2.__parentLib = nodename;
  2007. Lib_mmNode7_2.__parent = this;
  2008. this.childNodes.push(Lib_mmNode7_2);
  2009. this['Lib_mmNode8_0'] = Lib_mmNode8_0;
  2010. Lib_mmNode8_0.__parentLib = nodename;
  2011. Lib_mmNode8_0.__parent = this;
  2012. this.childNodes.push(Lib_mmNode8_0);
  2013. this['Lib_mmNode8_1'] = Lib_mmNode8_1;
  2014. Lib_mmNode8_1.__parentLib = nodename;
  2015. Lib_mmNode8_1.__parent = this;
  2016. this.childNodes.push(Lib_mmNode8_1);
  2017. this['Lib_mmNode8_2'] = Lib_mmNode8_2;
  2018. Lib_mmNode8_2.__parentLib = nodename;
  2019. Lib_mmNode8_2.__parent = this;
  2020. this.childNodes.push(Lib_mmNode8_2);
  2021. this['Lib_mmNode9_0'] = Lib_mmNode9_0;
  2022. Lib_mmNode9_0.__parentLib = nodename;
  2023. Lib_mmNode9_0.__parent = this;
  2024. this.childNodes.push(Lib_mmNode9_0);
  2025. this['Lib_mmNode9_1'] = Lib_mmNode9_1;
  2026. Lib_mmNode9_1.__parentLib = nodename;
  2027. Lib_mmNode9_1.__parent = this;
  2028. this.childNodes.push(Lib_mmNode9_1);
  2029. this['Lib_mmNode9_2'] = Lib_mmNode9_2;
  2030. Lib_mmNode9_2.__parentLib = nodename;
  2031. Lib_mmNode9_2.__parent = this;
  2032. this.childNodes.push(Lib_mmNode9_2);
  2033. this['Lib_mmNode10'] = Lib_mmNode10;
  2034. Lib_mmNode10.__parentLib = nodename;
  2035. Lib_mmNode10.__parent = this;
  2036. this.childNodes.push(Lib_mmNode10);
  2037. this['Lib_mmNode11_0'] = Lib_mmNode11_0;
  2038. Lib_mmNode11_0.__parentLib = nodename;
  2039. Lib_mmNode11_0.__parent = this;
  2040. this.childNodes.push(Lib_mmNode11_0);
  2041. this['Lib_mmNode11_1'] = Lib_mmNode11_1;
  2042. Lib_mmNode11_1.__parentLib = nodename;
  2043. Lib_mmNode11_1.__parent = this;
  2044. this.childNodes.push(Lib_mmNode11_1);
  2045. this['Lib_mmNode11_2'] = Lib_mmNode11_2;
  2046. Lib_mmNode11_2.__parentLib = nodename;
  2047. Lib_mmNode11_2.__parent = this;
  2048. this.childNodes.push(Lib_mmNode11_2);
  2049. /*@ControlContextMenu@*/
  2050. /*@Declare@*/
  2051. this.init(x, y, width, height, angle);
  2052. };
  2053. ht.Default.def('ht.lib.mm', Object, {
  2054. refresh10ms: function () {
  2055. var localVarObj = this.localVarObj;
  2056. var localDynamicVarObj = this.localDynamicVar();
  2057. var Lib_mmNode0= this.Lib_mmNode0;
  2058. var Lib_mmNode1= this.Lib_mmNode1;
  2059. var Lib_mmNode2= this.Lib_mmNode2;
  2060. var Lib_mmNode3= this.Lib_mmNode3;
  2061. var Lib_mmNode4= this.Lib_mmNode4;
  2062. var Lib_mmNode5= this.Lib_mmNode5;
  2063. var Lib_mmNode6= this.Lib_mmNode6;
  2064. var Lib_mmNode7_0= this.Lib_mmNode7_0;
  2065. var Lib_mmNode7_1= this.Lib_mmNode7_1;
  2066. var Lib_mmNode7_2= this.Lib_mmNode7_2;
  2067. var Lib_mmNode8_0= this.Lib_mmNode8_0;
  2068. var Lib_mmNode8_1= this.Lib_mmNode8_1;
  2069. var Lib_mmNode8_2= this.Lib_mmNode8_2;
  2070. var Lib_mmNode9_0= this.Lib_mmNode9_0;
  2071. var Lib_mmNode9_1= this.Lib_mmNode9_1;
  2072. var Lib_mmNode9_2= this.Lib_mmNode9_2;
  2073. var Lib_mmNode10= this.Lib_mmNode10;
  2074. var Lib_mmNode11_0= this.Lib_mmNode11_0;
  2075. var Lib_mmNode11_1= this.Lib_mmNode11_1;
  2076. var Lib_mmNode11_2= this.Lib_mmNode11_2;
  2077. /*@refresh10ms@*/
  2078. },
  2079. refresh100ms: function () {
  2080. var localVarObj = this.localVarObj;
  2081. var localDynamicVarObj = this.localDynamicVar();
  2082. var Lib_mmNode0= this.Lib_mmNode0;
  2083. var Lib_mmNode1= this.Lib_mmNode1;
  2084. var Lib_mmNode2= this.Lib_mmNode2;
  2085. var Lib_mmNode3= this.Lib_mmNode3;
  2086. var Lib_mmNode4= this.Lib_mmNode4;
  2087. var Lib_mmNode5= this.Lib_mmNode5;
  2088. var Lib_mmNode6= this.Lib_mmNode6;
  2089. var Lib_mmNode7_0= this.Lib_mmNode7_0;
  2090. var Lib_mmNode7_1= this.Lib_mmNode7_1;
  2091. var Lib_mmNode7_2= this.Lib_mmNode7_2;
  2092. var Lib_mmNode8_0= this.Lib_mmNode8_0;
  2093. var Lib_mmNode8_1= this.Lib_mmNode8_1;
  2094. var Lib_mmNode8_2= this.Lib_mmNode8_2;
  2095. var Lib_mmNode9_0= this.Lib_mmNode9_0;
  2096. var Lib_mmNode9_1= this.Lib_mmNode9_1;
  2097. var Lib_mmNode9_2= this.Lib_mmNode9_2;
  2098. var Lib_mmNode10= this.Lib_mmNode10;
  2099. var Lib_mmNode11_0= this.Lib_mmNode11_0;
  2100. var Lib_mmNode11_1= this.Lib_mmNode11_1;
  2101. var Lib_mmNode11_2= this.Lib_mmNode11_2;
  2102. /*@refresh100ms@*/
  2103. },
  2104. refresh500ms: function () {
  2105. var localVarObj = this.localVarObj;
  2106. var localDynamicVarObj = this.localDynamicVar();
  2107. var Lib_mmNode0= this.Lib_mmNode0;
  2108. var Lib_mmNode1= this.Lib_mmNode1;
  2109. var Lib_mmNode2= this.Lib_mmNode2;
  2110. var Lib_mmNode3= this.Lib_mmNode3;
  2111. var Lib_mmNode4= this.Lib_mmNode4;
  2112. var Lib_mmNode5= this.Lib_mmNode5;
  2113. var Lib_mmNode6= this.Lib_mmNode6;
  2114. var Lib_mmNode7_0= this.Lib_mmNode7_0;
  2115. var Lib_mmNode7_1= this.Lib_mmNode7_1;
  2116. var Lib_mmNode7_2= this.Lib_mmNode7_2;
  2117. var Lib_mmNode8_0= this.Lib_mmNode8_0;
  2118. var Lib_mmNode8_1= this.Lib_mmNode8_1;
  2119. var Lib_mmNode8_2= this.Lib_mmNode8_2;
  2120. var Lib_mmNode9_0= this.Lib_mmNode9_0;
  2121. var Lib_mmNode9_1= this.Lib_mmNode9_1;
  2122. var Lib_mmNode9_2= this.Lib_mmNode9_2;
  2123. var Lib_mmNode10= this.Lib_mmNode10;
  2124. var Lib_mmNode11_0= this.Lib_mmNode11_0;
  2125. var Lib_mmNode11_1= this.Lib_mmNode11_1;
  2126. var Lib_mmNode11_2= this.Lib_mmNode11_2;
  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_mmNode0= this.Lib_mmNode0;
  2134. var Lib_mmNode1= this.Lib_mmNode1;
  2135. var Lib_mmNode2= this.Lib_mmNode2;
  2136. var Lib_mmNode3= this.Lib_mmNode3;
  2137. var Lib_mmNode4= this.Lib_mmNode4;
  2138. var Lib_mmNode5= this.Lib_mmNode5;
  2139. var Lib_mmNode6= this.Lib_mmNode6;
  2140. var Lib_mmNode7_0= this.Lib_mmNode7_0;
  2141. var Lib_mmNode7_1= this.Lib_mmNode7_1;
  2142. var Lib_mmNode7_2= this.Lib_mmNode7_2;
  2143. var Lib_mmNode8_0= this.Lib_mmNode8_0;
  2144. var Lib_mmNode8_1= this.Lib_mmNode8_1;
  2145. var Lib_mmNode8_2= this.Lib_mmNode8_2;
  2146. var Lib_mmNode9_0= this.Lib_mmNode9_0;
  2147. var Lib_mmNode9_1= this.Lib_mmNode9_1;
  2148. var Lib_mmNode9_2= this.Lib_mmNode9_2;
  2149. var Lib_mmNode10= this.Lib_mmNode10;
  2150. var Lib_mmNode11_0= this.Lib_mmNode11_0;
  2151. var Lib_mmNode11_1= this.Lib_mmNode11_1;
  2152. var Lib_mmNode11_2= this.Lib_mmNode11_2;
  2153. /*@refresh1s@*/
  2154. },
  2155. refresh5s: function () {
  2156. var localVarObj = this.localVarObj;
  2157. var localDynamicVarObj = this.localDynamicVar();
  2158. var Lib_mmNode0= this.Lib_mmNode0;
  2159. var Lib_mmNode1= this.Lib_mmNode1;
  2160. var Lib_mmNode2= this.Lib_mmNode2;
  2161. var Lib_mmNode3= this.Lib_mmNode3;
  2162. var Lib_mmNode4= this.Lib_mmNode4;
  2163. var Lib_mmNode5= this.Lib_mmNode5;
  2164. var Lib_mmNode6= this.Lib_mmNode6;
  2165. var Lib_mmNode7_0= this.Lib_mmNode7_0;
  2166. var Lib_mmNode7_1= this.Lib_mmNode7_1;
  2167. var Lib_mmNode7_2= this.Lib_mmNode7_2;
  2168. var Lib_mmNode8_0= this.Lib_mmNode8_0;
  2169. var Lib_mmNode8_1= this.Lib_mmNode8_1;
  2170. var Lib_mmNode8_2= this.Lib_mmNode8_2;
  2171. var Lib_mmNode9_0= this.Lib_mmNode9_0;
  2172. var Lib_mmNode9_1= this.Lib_mmNode9_1;
  2173. var Lib_mmNode9_2= this.Lib_mmNode9_2;
  2174. var Lib_mmNode10= this.Lib_mmNode10;
  2175. var Lib_mmNode11_0= this.Lib_mmNode11_0;
  2176. var Lib_mmNode11_1= this.Lib_mmNode11_1;
  2177. var Lib_mmNode11_2= this.Lib_mmNode11_2;
  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_mmNode0= this.Lib_mmNode0;
  2185. var Lib_mmNode1= this.Lib_mmNode1;
  2186. var Lib_mmNode2= this.Lib_mmNode2;
  2187. var Lib_mmNode3= this.Lib_mmNode3;
  2188. var Lib_mmNode4= this.Lib_mmNode4;
  2189. var Lib_mmNode5= this.Lib_mmNode5;
  2190. var Lib_mmNode6= this.Lib_mmNode6;
  2191. var Lib_mmNode7_0= this.Lib_mmNode7_0;
  2192. var Lib_mmNode7_1= this.Lib_mmNode7_1;
  2193. var Lib_mmNode7_2= this.Lib_mmNode7_2;
  2194. var Lib_mmNode8_0= this.Lib_mmNode8_0;
  2195. var Lib_mmNode8_1= this.Lib_mmNode8_1;
  2196. var Lib_mmNode8_2= this.Lib_mmNode8_2;
  2197. var Lib_mmNode9_0= this.Lib_mmNode9_0;
  2198. var Lib_mmNode9_1= this.Lib_mmNode9_1;
  2199. var Lib_mmNode9_2= this.Lib_mmNode9_2;
  2200. var Lib_mmNode10= this.Lib_mmNode10;
  2201. var Lib_mmNode11_0= this.Lib_mmNode11_0;
  2202. var Lib_mmNode11_1= this.Lib_mmNode11_1;
  2203. var Lib_mmNode11_2= this.Lib_mmNode11_2;
  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. }