56.js 74 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965
  1. ht.lib = ht.lib || {};
  2. if (!ht.lib['56']) {
  3. ht.lib['56'] = function (x, y, width, height, angle, localVarObj, localDynamicVar, nodename) {
  4. _ratio = GD.getRatioWithRotation(0, ratio);
  5. ht.lib['56'].superClass.constructor.apply(this);
  6. this.localVarObj = localVarObj;
  7. this.localDynamicVar = localDynamicVar;
  8. this.childNodes = [];
  9. this._styleObject = {};
  10. this._originWidth = 36*_ratio.ratioX;
  11. this._originHeight = 30*_ratio.ratioY;
  12. this._baseClass = "ht.lib.56";
  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_56Node0type = 'oval';
  37. var Lib_56Node0 = new ht.Node(),
  38. Lib_56Node0BorderWidth = 2*2;
  39. if (Lib_56Node0type === 'arc') {
  40. Lib_56Node0BorderWidth *= 2;
  41. }
  42. Lib_56Node0.setImage(GD.getRectJSON(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY, Lib_56Node0type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  43. Lib_56Node0.setPosition(25*ratio.ratioX, 8*ratio.ratioY);
  44. Lib_56Node0.setSize(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY);
  45. Lib_56Node0.s({
  46. 'pixelPerfect':true
  47. /*@AddPara@*/
  48. });
  49. Lib_56Node0.a('node.width', 19.99998*_ratio.ratioX);
  50. Lib_56Node0.a('node.height', 16.36363*_ratio.ratioY);
  51. Lib_56Node0.a('node.type', Lib_56Node0type);
  52. Lib_56Node0.a('node.rect', [0, 0, 19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY]);
  53. Lib_56Node0.a('node.background', 'rgba(255,255,255,0.003921569)');
  54. Lib_56Node0.a('node.gradientcolor', '');
  55. Lib_56Node0.a('node.gradient', '');
  56. Lib_56Node0.a('node.borderwidth', Lib_56Node0BorderWidth);
  57. Lib_56Node0.a('node.color', 'rgba(255,128,0,1)');
  58. Lib_56Node0.a('node.fillrect', [0,0,0,0]);
  59. Lib_56Node0.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  60. Lib_56Node0.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  61. Lib_56Node0.a('node.fillgradient', '');
  62. if (Lib_56Node0type !== 'rect') {
  63. Lib_56Node0.a('node.arcFrom', parseFloat('@arcFrom@'));
  64. Lib_56Node0.a('node.arcTo', parseFloat('@arcTo@'));
  65. Lib_56Node0.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  66. }
  67. if (Lib_56Node0type === 'arc') {
  68. Lib_56Node0.a('node.arcOval', true);
  69. }
  70. Lib_56Node0.setRotation(0*Math.PI/180);
  71. Lib_56Node0.borderWidth = Lib_56Node0BorderWidth;
  72. Lib_56Node0.borderFillwidth = Lib_56Node0BorderWidth;
  73. dataModel.add(Lib_56Node0);
  74. Lib_56Node0._nodename = 'Lib_56Node0'
  75. Lib_56Node0._nodeType = 'rect';
  76. zoomNodeList.push({
  77. node: Lib_56Node0,
  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_56Node0, Lib_56Node0.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  98. var Lib_56Node1type = 'oval';
  99. var Lib_56Node1 = new ht.Node(),
  100. Lib_56Node1BorderWidth = 2*2;
  101. if (Lib_56Node1type === 'arc') {
  102. Lib_56Node1BorderWidth *= 2;
  103. }
  104. Lib_56Node1.setImage(GD.getRectJSON(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY, Lib_56Node1type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  105. Lib_56Node1.setPosition(25*ratio.ratioX, 21*ratio.ratioY);
  106. Lib_56Node1.setSize(19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY);
  107. Lib_56Node1.s({
  108. 'pixelPerfect':true
  109. /*@AddPara@*/
  110. });
  111. Lib_56Node1.a('node.width', 19.99998*_ratio.ratioX);
  112. Lib_56Node1.a('node.height', 16.36363*_ratio.ratioY);
  113. Lib_56Node1.a('node.type', Lib_56Node1type);
  114. Lib_56Node1.a('node.rect', [0, 0, 19.99998*_ratio.ratioX, 16.36363*_ratio.ratioY]);
  115. Lib_56Node1.a('node.background', 'rgba(255,255,255,0.003921569)');
  116. Lib_56Node1.a('node.gradientcolor', '');
  117. Lib_56Node1.a('node.gradient', '');
  118. Lib_56Node1.a('node.borderwidth', Lib_56Node1BorderWidth);
  119. Lib_56Node1.a('node.color', 'rgba(255,128,0,1)');
  120. Lib_56Node1.a('node.fillrect', [0,0,0,0]);
  121. Lib_56Node1.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  122. Lib_56Node1.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  123. Lib_56Node1.a('node.fillgradient', '');
  124. if (Lib_56Node1type !== 'rect') {
  125. Lib_56Node1.a('node.arcFrom', parseFloat('@arcFrom@'));
  126. Lib_56Node1.a('node.arcTo', parseFloat('@arcTo@'));
  127. Lib_56Node1.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  128. }
  129. if (Lib_56Node1type === 'arc') {
  130. Lib_56Node1.a('node.arcOval', true);
  131. }
  132. Lib_56Node1.setRotation(0*Math.PI/180);
  133. Lib_56Node1.borderWidth = Lib_56Node1BorderWidth;
  134. Lib_56Node1.borderFillwidth = Lib_56Node1BorderWidth;
  135. dataModel.add(Lib_56Node1);
  136. Lib_56Node1._nodename = 'Lib_56Node1'
  137. Lib_56Node1._nodeType = 'rect';
  138. zoomNodeList.push({
  139. node: Lib_56Node1,
  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_56Node1, Lib_56Node1.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  160. var Lib_56Node2type = 'oval';
  161. var Lib_56Node2 = new ht.Node(),
  162. Lib_56Node2BorderWidth = 2*2;
  163. if (Lib_56Node2type === 'arc') {
  164. Lib_56Node2BorderWidth *= 2;
  165. }
  166. Lib_56Node2.setImage(GD.getRectJSON(20*_ratio.ratioX, 16.36365*_ratio.ratioY, Lib_56Node2type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  167. Lib_56Node2.setPosition(10*ratio.ratioX, 15*ratio.ratioY);
  168. Lib_56Node2.setSize(20*_ratio.ratioX, 16.36365*_ratio.ratioY);
  169. Lib_56Node2.s({
  170. 'pixelPerfect':true
  171. /*@AddPara@*/
  172. });
  173. Lib_56Node2.a('node.width', 20*_ratio.ratioX);
  174. Lib_56Node2.a('node.height', 16.36365*_ratio.ratioY);
  175. Lib_56Node2.a('node.type', Lib_56Node2type);
  176. Lib_56Node2.a('node.rect', [0, 0, 20*_ratio.ratioX, 16.36365*_ratio.ratioY]);
  177. Lib_56Node2.a('node.background', 'rgba(255,255,255,0.003921569)');
  178. Lib_56Node2.a('node.gradientcolor', '');
  179. Lib_56Node2.a('node.gradient', '');
  180. Lib_56Node2.a('node.borderwidth', Lib_56Node2BorderWidth);
  181. Lib_56Node2.a('node.color', 'rgba(255,128,0,1)');
  182. Lib_56Node2.a('node.fillrect', [0,0,0,0]);
  183. Lib_56Node2.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  184. Lib_56Node2.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  185. Lib_56Node2.a('node.fillgradient', '');
  186. if (Lib_56Node2type !== 'rect') {
  187. Lib_56Node2.a('node.arcFrom', parseFloat('@arcFrom@'));
  188. Lib_56Node2.a('node.arcTo', parseFloat('@arcTo@'));
  189. Lib_56Node2.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  190. }
  191. if (Lib_56Node2type === 'arc') {
  192. Lib_56Node2.a('node.arcOval', true);
  193. }
  194. Lib_56Node2.setRotation(0*Math.PI/180);
  195. Lib_56Node2.borderWidth = Lib_56Node2BorderWidth;
  196. Lib_56Node2.borderFillwidth = Lib_56Node2BorderWidth;
  197. dataModel.add(Lib_56Node2);
  198. Lib_56Node2._nodename = 'Lib_56Node2'
  199. Lib_56Node2._nodeType = 'rect';
  200. zoomNodeList.push({
  201. node: Lib_56Node2,
  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_56Node2, Lib_56Node2.getImage());var Lib_56Node3points=[25, 3,25, 8],
  222. Lib_56Node3rect=ht.Default.unionPoint([{x:25,y:3},{x:25,y:8}]),
  223. Lib_56Node3compspts=[];
  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_56Node3points.length;i++){
  228. if(i%2==0){
  229. Lib_56Node3compspts.push(Lib_56Node3points[i]-Lib_56Node3rect.x);
  230. }else{
  231. Lib_56Node3compspts.push(Lib_56Node3points[i]-Lib_56Node3rect.y);
  232. }
  233. }
  234. var Lib_56Node3ptslength=Lib_56Node3compspts.length;
  235. if (Lib_56Node3rect.height === 0) {
  236. Lib_56Node3compspts[0] -= 0;
  237. Lib_56Node3compspts[Lib_56Node3ptslength-2] += 0;
  238. } else if (Lib_56Node3rect.width === 0){
  239. Lib_56Node3compspts[1] -= 0;
  240. Lib_56Node3compspts[Lib_56Node3ptslength-1] += 0;
  241. } else {
  242. Lib_56Node3compspts[0] -= 0;
  243. Lib_56Node3compspts[1] -= 0;
  244. Lib_56Node3compspts[Lib_56Node3ptslength-2] += 0;
  245. Lib_56Node3compspts[Lib_56Node3ptslength-1] += 0;
  246. }
  247. Lib_56Node3 = new ht.Node();
  248. Lib_56Node3.borderWidth = 2;
  249. Lib_56Node3rect.width = Lib_56Node3rect.width === 0 ? 0.0001 : Lib_56Node3rect.width;
  250. Lib_56Node3rect.height = Lib_56Node3rect.height === 0 ? 0.0001 : Lib_56Node3rect.height;
  251. var Lib_56Node3endCompspts = [Lib_56Node3compspts[Lib_56Node3ptslength-2],Lib_56Node3compspts[Lib_56Node3ptslength-1],0,0];
  252. var Lib_56Node3startCompspts = [Lib_56Node3compspts[0],Lib_56Node3compspts[1],0,0];
  253. Lib_56Node3.setImage(GD.getPolyLineJSON());
  254. Lib_56Node3.setPosition(Lib_56Node3rect.x+Lib_56Node3rect.width/2,Lib_56Node3rect.y+Lib_56Node3rect.height/2);
  255. Lib_56Node3.setSize(Lib_56Node3rect.width,Lib_56Node3rect.height);
  256. Lib_56Node3.setStyle("opacity",1);
  257. Lib_56Node3.s({'pixelPerfect':true});
  258. Lib_56Node3borderwidth=2;
  259. Lib_56Node3.setRotation(0);
  260. dataModel.add(Lib_56Node3);
  261. Lib_56Node3.a('node.points',Lib_56Node3compspts);
  262. Lib_56Node3.a('node.segments',[1,2]);
  263. Lib_56Node3.a('node.color','rgba(255,128,0,1)');
  264. Lib_56Node3.a('node.borderPattern',getDashStyle("@borderPattern@"));
  265. Lib_56Node3.a('node.borderColor','rgba(255,128,0,1)');
  266. Lib_56Node3.a('node.background','rgba(255,128,0,1)');
  267. Lib_56Node3.a('node.gradient','');
  268. Lib_56Node3.a('node.gradientcolor','rgba(255,128,0,1)');
  269. Lib_56Node3.a('node.endCompspts',Lib_56Node3endCompspts);
  270. Lib_56Node3.a('node.startCompspts',Lib_56Node3startCompspts);
  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_56Node3';
  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_56Node3, Lib_56Node3.getImage(), Lib_56Node3compspts, Lib_56Node3endCompspts, Lib_56Node3startCompspts);
  329. var Lib_56Node4points=[25, 8,30, 11],
  330. Lib_56Node4rect=ht.Default.unionPoint([{x:25,y:8},{x:30,y:11}]),
  331. Lib_56Node4compspts=[];
  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_56Node4points.length;i++){
  336. if(i%2==0){
  337. Lib_56Node4compspts.push(Lib_56Node4points[i]-Lib_56Node4rect.x);
  338. }else{
  339. Lib_56Node4compspts.push(Lib_56Node4points[i]-Lib_56Node4rect.y);
  340. }
  341. }
  342. var Lib_56Node4ptslength=Lib_56Node4compspts.length;
  343. if (Lib_56Node4rect.height === 0) {
  344. Lib_56Node4compspts[0] -= 0;
  345. Lib_56Node4compspts[Lib_56Node4ptslength-2] += 0;
  346. } else if (Lib_56Node4rect.width === 0){
  347. Lib_56Node4compspts[1] -= 0;
  348. Lib_56Node4compspts[Lib_56Node4ptslength-1] += 0;
  349. } else {
  350. Lib_56Node4compspts[0] -= 0;
  351. Lib_56Node4compspts[1] -= 0;
  352. Lib_56Node4compspts[Lib_56Node4ptslength-2] += 0;
  353. Lib_56Node4compspts[Lib_56Node4ptslength-1] += 0;
  354. }
  355. Lib_56Node4 = new ht.Node();
  356. Lib_56Node4.borderWidth = 2;
  357. Lib_56Node4rect.width = Lib_56Node4rect.width === 0 ? 0.0001 : Lib_56Node4rect.width;
  358. Lib_56Node4rect.height = Lib_56Node4rect.height === 0 ? 0.0001 : Lib_56Node4rect.height;
  359. var Lib_56Node4endCompspts = [Lib_56Node4compspts[Lib_56Node4ptslength-2],Lib_56Node4compspts[Lib_56Node4ptslength-1],0,0];
  360. var Lib_56Node4startCompspts = [Lib_56Node4compspts[0],Lib_56Node4compspts[1],0,0];
  361. Lib_56Node4.setImage(GD.getPolyLineJSON());
  362. Lib_56Node4.setPosition(Lib_56Node4rect.x+Lib_56Node4rect.width/2,Lib_56Node4rect.y+Lib_56Node4rect.height/2);
  363. Lib_56Node4.setSize(Lib_56Node4rect.width,Lib_56Node4rect.height);
  364. Lib_56Node4.setStyle("opacity",1);
  365. Lib_56Node4.s({'pixelPerfect':true});
  366. Lib_56Node4borderwidth=2;
  367. Lib_56Node4.setRotation(0);
  368. dataModel.add(Lib_56Node4);
  369. Lib_56Node4.a('node.points',Lib_56Node4compspts);
  370. Lib_56Node4.a('node.segments',[1,2]);
  371. Lib_56Node4.a('node.color','rgba(255,128,0,1)');
  372. Lib_56Node4.a('node.borderPattern',getDashStyle("@borderPattern@"));
  373. Lib_56Node4.a('node.borderColor','rgba(255,128,0,1)');
  374. Lib_56Node4.a('node.background','rgba(255,128,0,1)');
  375. Lib_56Node4.a('node.gradient','');
  376. Lib_56Node4.a('node.gradientcolor','rgba(255,128,0,1)');
  377. Lib_56Node4.a('node.endCompspts',Lib_56Node4endCompspts);
  378. Lib_56Node4.a('node.startCompspts',Lib_56Node4startCompspts);
  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_56Node4';
  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_56Node4, Lib_56Node4.getImage(), Lib_56Node4compspts, Lib_56Node4endCompspts, Lib_56Node4startCompspts);
  437. var Lib_56Node5points=[25, 8,20, 11],
  438. Lib_56Node5rect=ht.Default.unionPoint([{x:25,y:8},{x:20,y:11}]),
  439. Lib_56Node5compspts=[];
  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_56Node5points.length;i++){
  444. if(i%2==0){
  445. Lib_56Node5compspts.push(Lib_56Node5points[i]-Lib_56Node5rect.x);
  446. }else{
  447. Lib_56Node5compspts.push(Lib_56Node5points[i]-Lib_56Node5rect.y);
  448. }
  449. }
  450. var Lib_56Node5ptslength=Lib_56Node5compspts.length;
  451. if (Lib_56Node5rect.height === 0) {
  452. Lib_56Node5compspts[0] -= 0;
  453. Lib_56Node5compspts[Lib_56Node5ptslength-2] += 0;
  454. } else if (Lib_56Node5rect.width === 0){
  455. Lib_56Node5compspts[1] -= 0;
  456. Lib_56Node5compspts[Lib_56Node5ptslength-1] += 0;
  457. } else {
  458. Lib_56Node5compspts[0] -= 0;
  459. Lib_56Node5compspts[1] -= 0;
  460. Lib_56Node5compspts[Lib_56Node5ptslength-2] += 0;
  461. Lib_56Node5compspts[Lib_56Node5ptslength-1] += 0;
  462. }
  463. Lib_56Node5 = new ht.Node();
  464. Lib_56Node5.borderWidth = 2;
  465. Lib_56Node5rect.width = Lib_56Node5rect.width === 0 ? 0.0001 : Lib_56Node5rect.width;
  466. Lib_56Node5rect.height = Lib_56Node5rect.height === 0 ? 0.0001 : Lib_56Node5rect.height;
  467. var Lib_56Node5endCompspts = [Lib_56Node5compspts[Lib_56Node5ptslength-2],Lib_56Node5compspts[Lib_56Node5ptslength-1],0,0];
  468. var Lib_56Node5startCompspts = [Lib_56Node5compspts[0],Lib_56Node5compspts[1],0,0];
  469. Lib_56Node5.setImage(GD.getPolyLineJSON());
  470. Lib_56Node5.setPosition(Lib_56Node5rect.x+Lib_56Node5rect.width/2,Lib_56Node5rect.y+Lib_56Node5rect.height/2);
  471. Lib_56Node5.setSize(Lib_56Node5rect.width,Lib_56Node5rect.height);
  472. Lib_56Node5.setStyle("opacity",1);
  473. Lib_56Node5.s({'pixelPerfect':true});
  474. Lib_56Node5borderwidth=2;
  475. Lib_56Node5.setRotation(0);
  476. dataModel.add(Lib_56Node5);
  477. Lib_56Node5.a('node.points',Lib_56Node5compspts);
  478. Lib_56Node5.a('node.segments',[1,2]);
  479. Lib_56Node5.a('node.color','rgba(255,128,0,1)');
  480. Lib_56Node5.a('node.borderPattern',getDashStyle("@borderPattern@"));
  481. Lib_56Node5.a('node.borderColor','rgba(255,128,0,1)');
  482. Lib_56Node5.a('node.background','rgba(255,128,0,1)');
  483. Lib_56Node5.a('node.gradient','');
  484. Lib_56Node5.a('node.gradientcolor','rgba(255,128,0,1)');
  485. Lib_56Node5.a('node.endCompspts',Lib_56Node5endCompspts);
  486. Lib_56Node5.a('node.startCompspts',Lib_56Node5startCompspts);
  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_56Node5';
  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_56Node5, Lib_56Node5.getImage(), Lib_56Node5compspts, Lib_56Node5endCompspts, Lib_56Node5startCompspts);
  545. var Lib_56Node6points=[25, 17,25, 22],
  546. Lib_56Node6rect=ht.Default.unionPoint([{x:25,y:17},{x:25,y:22}]),
  547. Lib_56Node6compspts=[];
  548. _ratio = GD.getRatioWithRotation(0, ratio);
  549. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  550. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  551. for(var i=0;i<Lib_56Node6points.length;i++){
  552. if(i%2==0){
  553. Lib_56Node6compspts.push(Lib_56Node6points[i]-Lib_56Node6rect.x);
  554. }else{
  555. Lib_56Node6compspts.push(Lib_56Node6points[i]-Lib_56Node6rect.y);
  556. }
  557. }
  558. var Lib_56Node6ptslength=Lib_56Node6compspts.length;
  559. if (Lib_56Node6rect.height === 0) {
  560. Lib_56Node6compspts[0] -= 0;
  561. Lib_56Node6compspts[Lib_56Node6ptslength-2] += 0;
  562. } else if (Lib_56Node6rect.width === 0){
  563. Lib_56Node6compspts[1] -= 0;
  564. Lib_56Node6compspts[Lib_56Node6ptslength-1] += 0;
  565. } else {
  566. Lib_56Node6compspts[0] -= 0;
  567. Lib_56Node6compspts[1] -= 0;
  568. Lib_56Node6compspts[Lib_56Node6ptslength-2] += 0;
  569. Lib_56Node6compspts[Lib_56Node6ptslength-1] += 0;
  570. }
  571. Lib_56Node6 = new ht.Node();
  572. Lib_56Node6.borderWidth = 2;
  573. Lib_56Node6rect.width = Lib_56Node6rect.width === 0 ? 0.0001 : Lib_56Node6rect.width;
  574. Lib_56Node6rect.height = Lib_56Node6rect.height === 0 ? 0.0001 : Lib_56Node6rect.height;
  575. var Lib_56Node6endCompspts = [Lib_56Node6compspts[Lib_56Node6ptslength-2],Lib_56Node6compspts[Lib_56Node6ptslength-1],0,0];
  576. var Lib_56Node6startCompspts = [Lib_56Node6compspts[0],Lib_56Node6compspts[1],0,0];
  577. Lib_56Node6.setImage(GD.getPolyLineJSON());
  578. Lib_56Node6.setPosition(Lib_56Node6rect.x+Lib_56Node6rect.width/2,Lib_56Node6rect.y+Lib_56Node6rect.height/2);
  579. Lib_56Node6.setSize(Lib_56Node6rect.width,Lib_56Node6rect.height);
  580. Lib_56Node6.setStyle("opacity",1);
  581. Lib_56Node6.s({'pixelPerfect':true});
  582. Lib_56Node6borderwidth=2;
  583. Lib_56Node6.setRotation(0);
  584. dataModel.add(Lib_56Node6);
  585. Lib_56Node6.a('node.points',Lib_56Node6compspts);
  586. Lib_56Node6.a('node.segments',[1,2]);
  587. Lib_56Node6.a('node.color','rgba(255,128,0,1)');
  588. Lib_56Node6.a('node.borderPattern',getDashStyle("@borderPattern@"));
  589. Lib_56Node6.a('node.borderColor','rgba(255,128,0,1)');
  590. Lib_56Node6.a('node.background','rgba(255,128,0,1)');
  591. Lib_56Node6.a('node.gradient','');
  592. Lib_56Node6.a('node.gradientcolor','rgba(255,128,0,1)');
  593. Lib_56Node6.a('node.endCompspts',Lib_56Node6endCompspts);
  594. Lib_56Node6.a('node.startCompspts',Lib_56Node6startCompspts);
  595. (function (node, img, compspts, endCompspts, startCompspts) {
  596. var position = node.getPosition(),
  597. w = node.getWidth()*_ratio.ratioX,
  598. h = node.getHeight()*_ratio.ratioY;
  599. function resetPoints(rx, ry) {
  600. for (var i = 0, len = compspts.length; i < len; i++) {
  601. if (i%2 === 0) {
  602. compspts[i]*=rx;
  603. } else {
  604. compspts[i]*=ry;
  605. }
  606. }
  607. endCompspts[0] = compspts[compspts.length-2];
  608. endCompspts[1] = compspts[compspts.length-1];
  609. endCompspts[2] *= rx;
  610. endCompspts[3] *= ry;
  611. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  612. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  613. startCompspts[0] = compspts[0];
  614. startCompspts[1] = compspts[1];
  615. startCompspts[2] *= rx;
  616. startCompspts[3] *= ry;
  617. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  618. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  619. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  620. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  621. }
  622. node.setSize(w, h);
  623. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  624. node.a('node.width', w);
  625. node.a('node.height', h);
  626. resetPoints(_ratio.ratioX, _ratio.ratioY);
  627. node.borderWidth = 2;
  628. node.a('node.borderwidth',node.borderWidth);
  629. node._nodename = 'Lib_56Node6';
  630. node._nodeType = 'line';
  631. zoomNodeList.push({
  632. node: node,
  633. attr: 'node.borderwidth'
  634. });
  635. var setWidth = node.setWidth,
  636. setHeight = node.setHeight,
  637. timer, rx = 1, ry = 1;
  638. node.setWidth = function (width) {
  639. var _width = this.getWidth();
  640. rx = width / _width;
  641. node.a('node.width', width);
  642. setWidth.apply(this, arguments);
  643. resetPoints(rx, 1);
  644. }
  645. node.setHeight = function (height) {
  646. var _height = this.getHeight();
  647. ry = height / _height;
  648. node.a('node.height', height);
  649. setHeight.apply(this, arguments);
  650. resetPoints(1, ry);
  651. }
  652. })(Lib_56Node6, Lib_56Node6.getImage(), Lib_56Node6compspts, Lib_56Node6endCompspts, Lib_56Node6startCompspts);
  653. var Lib_56Node7points=[25, 22,30, 25],
  654. Lib_56Node7rect=ht.Default.unionPoint([{x:25,y:22},{x:30,y:25}]),
  655. Lib_56Node7compspts=[];
  656. _ratio = GD.getRatioWithRotation(0, ratio);
  657. var _startratio = GD.getRatioWithRotation(3.68201217139115, ratio),
  658. _endratio = GD.getRatioWithRotation(0.540419517801362, ratio);
  659. for(var i=0;i<Lib_56Node7points.length;i++){
  660. if(i%2==0){
  661. Lib_56Node7compspts.push(Lib_56Node7points[i]-Lib_56Node7rect.x);
  662. }else{
  663. Lib_56Node7compspts.push(Lib_56Node7points[i]-Lib_56Node7rect.y);
  664. }
  665. }
  666. var Lib_56Node7ptslength=Lib_56Node7compspts.length;
  667. if (Lib_56Node7rect.height === 0) {
  668. Lib_56Node7compspts[0] -= 0;
  669. Lib_56Node7compspts[Lib_56Node7ptslength-2] += 0;
  670. } else if (Lib_56Node7rect.width === 0){
  671. Lib_56Node7compspts[1] -= 0;
  672. Lib_56Node7compspts[Lib_56Node7ptslength-1] += 0;
  673. } else {
  674. Lib_56Node7compspts[0] -= 0;
  675. Lib_56Node7compspts[1] -= 0;
  676. Lib_56Node7compspts[Lib_56Node7ptslength-2] += 0;
  677. Lib_56Node7compspts[Lib_56Node7ptslength-1] += 0;
  678. }
  679. Lib_56Node7 = new ht.Node();
  680. Lib_56Node7.borderWidth = 2;
  681. Lib_56Node7rect.width = Lib_56Node7rect.width === 0 ? 0.0001 : Lib_56Node7rect.width;
  682. Lib_56Node7rect.height = Lib_56Node7rect.height === 0 ? 0.0001 : Lib_56Node7rect.height;
  683. var Lib_56Node7endCompspts = [Lib_56Node7compspts[Lib_56Node7ptslength-2],Lib_56Node7compspts[Lib_56Node7ptslength-1],0,0];
  684. var Lib_56Node7startCompspts = [Lib_56Node7compspts[0],Lib_56Node7compspts[1],0,0];
  685. Lib_56Node7.setImage(GD.getPolyLineJSON());
  686. Lib_56Node7.setPosition(Lib_56Node7rect.x+Lib_56Node7rect.width/2,Lib_56Node7rect.y+Lib_56Node7rect.height/2);
  687. Lib_56Node7.setSize(Lib_56Node7rect.width,Lib_56Node7rect.height);
  688. Lib_56Node7.setStyle("opacity",1);
  689. Lib_56Node7.s({'pixelPerfect':true});
  690. Lib_56Node7borderwidth=2;
  691. Lib_56Node7.setRotation(0);
  692. dataModel.add(Lib_56Node7);
  693. Lib_56Node7.a('node.points',Lib_56Node7compspts);
  694. Lib_56Node7.a('node.segments',[1,2]);
  695. Lib_56Node7.a('node.color','rgba(255,128,0,1)');
  696. Lib_56Node7.a('node.borderPattern',getDashStyle("@borderPattern@"));
  697. Lib_56Node7.a('node.borderColor','rgba(255,128,0,1)');
  698. Lib_56Node7.a('node.background','rgba(255,128,0,1)');
  699. Lib_56Node7.a('node.gradient','');
  700. Lib_56Node7.a('node.gradientcolor','rgba(255,128,0,1)');
  701. Lib_56Node7.a('node.endCompspts',Lib_56Node7endCompspts);
  702. Lib_56Node7.a('node.startCompspts',Lib_56Node7startCompspts);
  703. (function (node, img, compspts, endCompspts, startCompspts) {
  704. var position = node.getPosition(),
  705. w = node.getWidth()*_ratio.ratioX,
  706. h = node.getHeight()*_ratio.ratioY;
  707. function resetPoints(rx, ry) {
  708. for (var i = 0, len = compspts.length; i < len; i++) {
  709. if (i%2 === 0) {
  710. compspts[i]*=rx;
  711. } else {
  712. compspts[i]*=ry;
  713. }
  714. }
  715. endCompspts[0] = compspts[compspts.length-2];
  716. endCompspts[1] = compspts[compspts.length-1];
  717. endCompspts[2] *= rx;
  718. endCompspts[3] *= ry;
  719. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  720. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  721. startCompspts[0] = compspts[0];
  722. startCompspts[1] = compspts[1];
  723. startCompspts[2] *= rx;
  724. startCompspts[3] *= ry;
  725. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  726. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  727. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  728. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  729. }
  730. node.setSize(w, h);
  731. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  732. node.a('node.width', w);
  733. node.a('node.height', h);
  734. resetPoints(_ratio.ratioX, _ratio.ratioY);
  735. node.borderWidth = 2;
  736. node.a('node.borderwidth',node.borderWidth);
  737. node._nodename = 'Lib_56Node7';
  738. node._nodeType = 'line';
  739. zoomNodeList.push({
  740. node: node,
  741. attr: 'node.borderwidth'
  742. });
  743. var setWidth = node.setWidth,
  744. setHeight = node.setHeight,
  745. timer, rx = 1, ry = 1;
  746. node.setWidth = function (width) {
  747. var _width = this.getWidth();
  748. rx = width / _width;
  749. node.a('node.width', width);
  750. setWidth.apply(this, arguments);
  751. resetPoints(rx, 1);
  752. }
  753. node.setHeight = function (height) {
  754. var _height = this.getHeight();
  755. ry = height / _height;
  756. node.a('node.height', height);
  757. setHeight.apply(this, arguments);
  758. resetPoints(1, ry);
  759. }
  760. })(Lib_56Node7, Lib_56Node7.getImage(), Lib_56Node7compspts, Lib_56Node7endCompspts, Lib_56Node7startCompspts);
  761. var Lib_56Node8points=[25, 22,20, 25],
  762. Lib_56Node8rect=ht.Default.unionPoint([{x:25,y:22},{x:20,y:25}]),
  763. Lib_56Node8compspts=[];
  764. _ratio = GD.getRatioWithRotation(0, ratio);
  765. var _startratio = GD.getRatioWithRotation(-0.540419517801362, ratio),
  766. _endratio = GD.getRatioWithRotation(2.60117313578843, ratio);
  767. for(var i=0;i<Lib_56Node8points.length;i++){
  768. if(i%2==0){
  769. Lib_56Node8compspts.push(Lib_56Node8points[i]-Lib_56Node8rect.x);
  770. }else{
  771. Lib_56Node8compspts.push(Lib_56Node8points[i]-Lib_56Node8rect.y);
  772. }
  773. }
  774. var Lib_56Node8ptslength=Lib_56Node8compspts.length;
  775. if (Lib_56Node8rect.height === 0) {
  776. Lib_56Node8compspts[0] -= 0;
  777. Lib_56Node8compspts[Lib_56Node8ptslength-2] += 0;
  778. } else if (Lib_56Node8rect.width === 0){
  779. Lib_56Node8compspts[1] -= 0;
  780. Lib_56Node8compspts[Lib_56Node8ptslength-1] += 0;
  781. } else {
  782. Lib_56Node8compspts[0] -= 0;
  783. Lib_56Node8compspts[1] -= 0;
  784. Lib_56Node8compspts[Lib_56Node8ptslength-2] += 0;
  785. Lib_56Node8compspts[Lib_56Node8ptslength-1] += 0;
  786. }
  787. Lib_56Node8 = new ht.Node();
  788. Lib_56Node8.borderWidth = 2;
  789. Lib_56Node8rect.width = Lib_56Node8rect.width === 0 ? 0.0001 : Lib_56Node8rect.width;
  790. Lib_56Node8rect.height = Lib_56Node8rect.height === 0 ? 0.0001 : Lib_56Node8rect.height;
  791. var Lib_56Node8endCompspts = [Lib_56Node8compspts[Lib_56Node8ptslength-2],Lib_56Node8compspts[Lib_56Node8ptslength-1],0,0];
  792. var Lib_56Node8startCompspts = [Lib_56Node8compspts[0],Lib_56Node8compspts[1],0,0];
  793. Lib_56Node8.setImage(GD.getPolyLineJSON());
  794. Lib_56Node8.setPosition(Lib_56Node8rect.x+Lib_56Node8rect.width/2,Lib_56Node8rect.y+Lib_56Node8rect.height/2);
  795. Lib_56Node8.setSize(Lib_56Node8rect.width,Lib_56Node8rect.height);
  796. Lib_56Node8.setStyle("opacity",1);
  797. Lib_56Node8.s({'pixelPerfect':true});
  798. Lib_56Node8borderwidth=2;
  799. Lib_56Node8.setRotation(0);
  800. dataModel.add(Lib_56Node8);
  801. Lib_56Node8.a('node.points',Lib_56Node8compspts);
  802. Lib_56Node8.a('node.segments',[1,2]);
  803. Lib_56Node8.a('node.color','rgba(255,128,0,1)');
  804. Lib_56Node8.a('node.borderPattern',getDashStyle("@borderPattern@"));
  805. Lib_56Node8.a('node.borderColor','rgba(255,128,0,1)');
  806. Lib_56Node8.a('node.background','rgba(255,128,0,1)');
  807. Lib_56Node8.a('node.gradient','');
  808. Lib_56Node8.a('node.gradientcolor','rgba(255,128,0,1)');
  809. Lib_56Node8.a('node.endCompspts',Lib_56Node8endCompspts);
  810. Lib_56Node8.a('node.startCompspts',Lib_56Node8startCompspts);
  811. (function (node, img, compspts, endCompspts, startCompspts) {
  812. var position = node.getPosition(),
  813. w = node.getWidth()*_ratio.ratioX,
  814. h = node.getHeight()*_ratio.ratioY;
  815. function resetPoints(rx, ry) {
  816. for (var i = 0, len = compspts.length; i < len; i++) {
  817. if (i%2 === 0) {
  818. compspts[i]*=rx;
  819. } else {
  820. compspts[i]*=ry;
  821. }
  822. }
  823. endCompspts[0] = compspts[compspts.length-2];
  824. endCompspts[1] = compspts[compspts.length-1];
  825. endCompspts[2] *= rx;
  826. endCompspts[3] *= ry;
  827. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  828. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  829. startCompspts[0] = compspts[0];
  830. startCompspts[1] = compspts[1];
  831. startCompspts[2] *= rx;
  832. startCompspts[3] *= ry;
  833. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  834. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  835. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  836. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  837. }
  838. node.setSize(w, h);
  839. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  840. node.a('node.width', w);
  841. node.a('node.height', h);
  842. resetPoints(_ratio.ratioX, _ratio.ratioY);
  843. node.borderWidth = 2;
  844. node.a('node.borderwidth',node.borderWidth);
  845. node._nodename = 'Lib_56Node8';
  846. node._nodeType = 'line';
  847. zoomNodeList.push({
  848. node: node,
  849. attr: 'node.borderwidth'
  850. });
  851. var setWidth = node.setWidth,
  852. setHeight = node.setHeight,
  853. timer, rx = 1, ry = 1;
  854. node.setWidth = function (width) {
  855. var _width = this.getWidth();
  856. rx = width / _width;
  857. node.a('node.width', width);
  858. setWidth.apply(this, arguments);
  859. resetPoints(rx, 1);
  860. }
  861. node.setHeight = function (height) {
  862. var _height = this.getHeight();
  863. ry = height / _height;
  864. node.a('node.height', height);
  865. setHeight.apply(this, arguments);
  866. resetPoints(1, ry);
  867. }
  868. })(Lib_56Node8, Lib_56Node8.getImage(), Lib_56Node8compspts, Lib_56Node8endCompspts, Lib_56Node8startCompspts);
  869. var Lib_56Node9points=[4, 15,12, 10],
  870. Lib_56Node9rect=ht.Default.unionPoint([{x:4,y:15},{x:12,y:10}]),
  871. Lib_56Node9compspts=[];
  872. _ratio = GD.getRatioWithRotation(0, ratio);
  873. var _startratio = GD.getRatioWithRotation(2.58299333824623, ratio),
  874. _endratio = GD.getRatioWithRotation(-0.558599315343562, ratio);
  875. for(var i=0;i<Lib_56Node9points.length;i++){
  876. if(i%2==0){
  877. Lib_56Node9compspts.push(Lib_56Node9points[i]-Lib_56Node9rect.x);
  878. }else{
  879. Lib_56Node9compspts.push(Lib_56Node9points[i]-Lib_56Node9rect.y);
  880. }
  881. }
  882. var Lib_56Node9ptslength=Lib_56Node9compspts.length;
  883. if (Lib_56Node9rect.height === 0) {
  884. Lib_56Node9compspts[0] -= 0;
  885. Lib_56Node9compspts[Lib_56Node9ptslength-2] += 0;
  886. } else if (Lib_56Node9rect.width === 0){
  887. Lib_56Node9compspts[1] -= 0;
  888. Lib_56Node9compspts[Lib_56Node9ptslength-1] += 0;
  889. } else {
  890. Lib_56Node9compspts[0] -= 0;
  891. Lib_56Node9compspts[1] -= 0;
  892. Lib_56Node9compspts[Lib_56Node9ptslength-2] += 0;
  893. Lib_56Node9compspts[Lib_56Node9ptslength-1] += 0;
  894. }
  895. Lib_56Node9 = new ht.Node();
  896. Lib_56Node9.borderWidth = 2;
  897. Lib_56Node9rect.width = Lib_56Node9rect.width === 0 ? 0.0001 : Lib_56Node9rect.width;
  898. Lib_56Node9rect.height = Lib_56Node9rect.height === 0 ? 0.0001 : Lib_56Node9rect.height;
  899. var Lib_56Node9endCompspts = [Lib_56Node9compspts[Lib_56Node9ptslength-2],Lib_56Node9compspts[Lib_56Node9ptslength-1],0,0];
  900. var Lib_56Node9startCompspts = [Lib_56Node9compspts[0],Lib_56Node9compspts[1],0,0];
  901. Lib_56Node9.setImage(GD.getPolyLineJSON());
  902. Lib_56Node9.setPosition(Lib_56Node9rect.x+Lib_56Node9rect.width/2,Lib_56Node9rect.y+Lib_56Node9rect.height/2);
  903. Lib_56Node9.setSize(Lib_56Node9rect.width,Lib_56Node9rect.height);
  904. Lib_56Node9.setStyle("opacity",1);
  905. Lib_56Node9.s({'pixelPerfect':true});
  906. Lib_56Node9borderwidth=2;
  907. Lib_56Node9.setRotation(0);
  908. dataModel.add(Lib_56Node9);
  909. Lib_56Node9.a('node.points',Lib_56Node9compspts);
  910. Lib_56Node9.a('node.segments',[1,2]);
  911. Lib_56Node9.a('node.color','rgba(255,128,0,1)');
  912. Lib_56Node9.a('node.borderPattern',getDashStyle("@borderPattern@"));
  913. Lib_56Node9.a('node.borderColor','rgba(255,128,0,1)');
  914. Lib_56Node9.a('node.background','rgba(255,128,0,1)');
  915. Lib_56Node9.a('node.gradient','');
  916. Lib_56Node9.a('node.gradientcolor','rgba(255,128,0,1)');
  917. Lib_56Node9.a('node.endCompspts',Lib_56Node9endCompspts);
  918. Lib_56Node9.a('node.startCompspts',Lib_56Node9startCompspts);
  919. (function (node, img, compspts, endCompspts, startCompspts) {
  920. var position = node.getPosition(),
  921. w = node.getWidth()*_ratio.ratioX,
  922. h = node.getHeight()*_ratio.ratioY;
  923. function resetPoints(rx, ry) {
  924. for (var i = 0, len = compspts.length; i < len; i++) {
  925. if (i%2 === 0) {
  926. compspts[i]*=rx;
  927. } else {
  928. compspts[i]*=ry;
  929. }
  930. }
  931. endCompspts[0] = compspts[compspts.length-2];
  932. endCompspts[1] = compspts[compspts.length-1];
  933. endCompspts[2] *= rx;
  934. endCompspts[3] *= ry;
  935. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  936. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  937. startCompspts[0] = compspts[0];
  938. startCompspts[1] = compspts[1];
  939. startCompspts[2] *= rx;
  940. startCompspts[3] *= ry;
  941. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  942. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  943. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  944. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  945. }
  946. node.setSize(w, h);
  947. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  948. node.a('node.width', w);
  949. node.a('node.height', h);
  950. resetPoints(_ratio.ratioX, _ratio.ratioY);
  951. node.borderWidth = 2;
  952. node.a('node.borderwidth',node.borderWidth);
  953. node._nodename = 'Lib_56Node9';
  954. node._nodeType = 'line';
  955. zoomNodeList.push({
  956. node: node,
  957. attr: 'node.borderwidth'
  958. });
  959. var setWidth = node.setWidth,
  960. setHeight = node.setHeight,
  961. timer, rx = 1, ry = 1;
  962. node.setWidth = function (width) {
  963. var _width = this.getWidth();
  964. rx = width / _width;
  965. node.a('node.width', width);
  966. setWidth.apply(this, arguments);
  967. resetPoints(rx, 1);
  968. }
  969. node.setHeight = function (height) {
  970. var _height = this.getHeight();
  971. ry = height / _height;
  972. node.a('node.height', height);
  973. setHeight.apply(this, arguments);
  974. resetPoints(1, ry);
  975. }
  976. })(Lib_56Node9, Lib_56Node9.getImage(), Lib_56Node9compspts, Lib_56Node9endCompspts, Lib_56Node9startCompspts);
  977. var Lib_56Node10points=[12, 10,12, 20],
  978. Lib_56Node10rect=ht.Default.unionPoint([{x:12,y:10},{x:12,y:20}]),
  979. Lib_56Node10compspts=[];
  980. _ratio = GD.getRatioWithRotation(0, ratio);
  981. var _startratio = GD.getRatioWithRotation(4.71238898038469, ratio),
  982. _endratio = GD.getRatioWithRotation(7.85398163397448, ratio);
  983. for(var i=0;i<Lib_56Node10points.length;i++){
  984. if(i%2==0){
  985. Lib_56Node10compspts.push(Lib_56Node10points[i]-Lib_56Node10rect.x);
  986. }else{
  987. Lib_56Node10compspts.push(Lib_56Node10points[i]-Lib_56Node10rect.y);
  988. }
  989. }
  990. var Lib_56Node10ptslength=Lib_56Node10compspts.length;
  991. if (Lib_56Node10rect.height === 0) {
  992. Lib_56Node10compspts[0] -= 0;
  993. Lib_56Node10compspts[Lib_56Node10ptslength-2] += 0;
  994. } else if (Lib_56Node10rect.width === 0){
  995. Lib_56Node10compspts[1] -= 0;
  996. Lib_56Node10compspts[Lib_56Node10ptslength-1] += 0;
  997. } else {
  998. Lib_56Node10compspts[0] -= 0;
  999. Lib_56Node10compspts[1] -= 0;
  1000. Lib_56Node10compspts[Lib_56Node10ptslength-2] += 0;
  1001. Lib_56Node10compspts[Lib_56Node10ptslength-1] += 0;
  1002. }
  1003. Lib_56Node10 = new ht.Node();
  1004. Lib_56Node10.borderWidth = 2;
  1005. Lib_56Node10rect.width = Lib_56Node10rect.width === 0 ? 0.0001 : Lib_56Node10rect.width;
  1006. Lib_56Node10rect.height = Lib_56Node10rect.height === 0 ? 0.0001 : Lib_56Node10rect.height;
  1007. var Lib_56Node10endCompspts = [Lib_56Node10compspts[Lib_56Node10ptslength-2],Lib_56Node10compspts[Lib_56Node10ptslength-1],0,0];
  1008. var Lib_56Node10startCompspts = [Lib_56Node10compspts[0],Lib_56Node10compspts[1],0,0];
  1009. Lib_56Node10.setImage(GD.getPolyLineJSON());
  1010. Lib_56Node10.setPosition(Lib_56Node10rect.x+Lib_56Node10rect.width/2,Lib_56Node10rect.y+Lib_56Node10rect.height/2);
  1011. Lib_56Node10.setSize(Lib_56Node10rect.width,Lib_56Node10rect.height);
  1012. Lib_56Node10.setStyle("opacity",1);
  1013. Lib_56Node10.s({'pixelPerfect':true});
  1014. Lib_56Node10borderwidth=2;
  1015. Lib_56Node10.setRotation(0);
  1016. dataModel.add(Lib_56Node10);
  1017. Lib_56Node10.a('node.points',Lib_56Node10compspts);
  1018. Lib_56Node10.a('node.segments',[1,2]);
  1019. Lib_56Node10.a('node.color','rgba(255,128,0,1)');
  1020. Lib_56Node10.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1021. Lib_56Node10.a('node.borderColor','rgba(255,128,0,1)');
  1022. Lib_56Node10.a('node.background','rgba(255,128,0,1)');
  1023. Lib_56Node10.a('node.gradient','');
  1024. Lib_56Node10.a('node.gradientcolor','rgba(255,128,0,1)');
  1025. Lib_56Node10.a('node.endCompspts',Lib_56Node10endCompspts);
  1026. Lib_56Node10.a('node.startCompspts',Lib_56Node10startCompspts);
  1027. (function (node, img, compspts, endCompspts, startCompspts) {
  1028. var position = node.getPosition(),
  1029. w = node.getWidth()*_ratio.ratioX,
  1030. h = node.getHeight()*_ratio.ratioY;
  1031. function resetPoints(rx, ry) {
  1032. for (var i = 0, len = compspts.length; i < len; i++) {
  1033. if (i%2 === 0) {
  1034. compspts[i]*=rx;
  1035. } else {
  1036. compspts[i]*=ry;
  1037. }
  1038. }
  1039. endCompspts[0] = compspts[compspts.length-2];
  1040. endCompspts[1] = compspts[compspts.length-1];
  1041. endCompspts[2] *= rx;
  1042. endCompspts[3] *= ry;
  1043. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1044. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1045. startCompspts[0] = compspts[0];
  1046. startCompspts[1] = compspts[1];
  1047. startCompspts[2] *= rx;
  1048. startCompspts[3] *= ry;
  1049. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1050. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1051. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1052. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1053. }
  1054. node.setSize(w, h);
  1055. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1056. node.a('node.width', w);
  1057. node.a('node.height', h);
  1058. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1059. node.borderWidth = 2;
  1060. node.a('node.borderwidth',node.borderWidth);
  1061. node._nodename = 'Lib_56Node10';
  1062. node._nodeType = 'line';
  1063. zoomNodeList.push({
  1064. node: node,
  1065. attr: 'node.borderwidth'
  1066. });
  1067. var setWidth = node.setWidth,
  1068. setHeight = node.setHeight,
  1069. timer, rx = 1, ry = 1;
  1070. node.setWidth = function (width) {
  1071. var _width = this.getWidth();
  1072. rx = width / _width;
  1073. node.a('node.width', width);
  1074. setWidth.apply(this, arguments);
  1075. resetPoints(rx, 1);
  1076. }
  1077. node.setHeight = function (height) {
  1078. var _height = this.getHeight();
  1079. ry = height / _height;
  1080. node.a('node.height', height);
  1081. setHeight.apply(this, arguments);
  1082. resetPoints(1, ry);
  1083. }
  1084. })(Lib_56Node10, Lib_56Node10.getImage(), Lib_56Node10compspts, Lib_56Node10endCompspts, Lib_56Node10startCompspts);
  1085. var Lib_56Node11points=[5, 15,12, 20],
  1086. Lib_56Node11rect=ht.Default.unionPoint([{x:5,y:15},{x:12,y:20}]),
  1087. Lib_56Node11compspts=[];
  1088. _ratio = GD.getRatioWithRotation(0, ratio);
  1089. var _startratio = GD.getRatioWithRotation(3.76184215084917, ratio),
  1090. _endratio = GD.getRatioWithRotation(0.620249497259376, ratio);
  1091. for(var i=0;i<Lib_56Node11points.length;i++){
  1092. if(i%2==0){
  1093. Lib_56Node11compspts.push(Lib_56Node11points[i]-Lib_56Node11rect.x);
  1094. }else{
  1095. Lib_56Node11compspts.push(Lib_56Node11points[i]-Lib_56Node11rect.y);
  1096. }
  1097. }
  1098. var Lib_56Node11ptslength=Lib_56Node11compspts.length;
  1099. if (Lib_56Node11rect.height === 0) {
  1100. Lib_56Node11compspts[0] -= 0;
  1101. Lib_56Node11compspts[Lib_56Node11ptslength-2] += 0;
  1102. } else if (Lib_56Node11rect.width === 0){
  1103. Lib_56Node11compspts[1] -= 0;
  1104. Lib_56Node11compspts[Lib_56Node11ptslength-1] += 0;
  1105. } else {
  1106. Lib_56Node11compspts[0] -= 0;
  1107. Lib_56Node11compspts[1] -= 0;
  1108. Lib_56Node11compspts[Lib_56Node11ptslength-2] += 0;
  1109. Lib_56Node11compspts[Lib_56Node11ptslength-1] += 0;
  1110. }
  1111. Lib_56Node11 = new ht.Node();
  1112. Lib_56Node11.borderWidth = 2;
  1113. Lib_56Node11rect.width = Lib_56Node11rect.width === 0 ? 0.0001 : Lib_56Node11rect.width;
  1114. Lib_56Node11rect.height = Lib_56Node11rect.height === 0 ? 0.0001 : Lib_56Node11rect.height;
  1115. var Lib_56Node11endCompspts = [Lib_56Node11compspts[Lib_56Node11ptslength-2],Lib_56Node11compspts[Lib_56Node11ptslength-1],0,0];
  1116. var Lib_56Node11startCompspts = [Lib_56Node11compspts[0],Lib_56Node11compspts[1],0,0];
  1117. Lib_56Node11.setImage(GD.getPolyLineJSON());
  1118. Lib_56Node11.setPosition(Lib_56Node11rect.x+Lib_56Node11rect.width/2,Lib_56Node11rect.y+Lib_56Node11rect.height/2);
  1119. Lib_56Node11.setSize(Lib_56Node11rect.width,Lib_56Node11rect.height);
  1120. Lib_56Node11.setStyle("opacity",1);
  1121. Lib_56Node11.s({'pixelPerfect':true});
  1122. Lib_56Node11borderwidth=2;
  1123. Lib_56Node11.setRotation(0);
  1124. dataModel.add(Lib_56Node11);
  1125. Lib_56Node11.a('node.points',Lib_56Node11compspts);
  1126. Lib_56Node11.a('node.segments',[1,2]);
  1127. Lib_56Node11.a('node.color','rgba(255,128,0,1)');
  1128. Lib_56Node11.a('node.borderPattern',getDashStyle("@borderPattern@"));
  1129. Lib_56Node11.a('node.borderColor','rgba(255,128,0,1)');
  1130. Lib_56Node11.a('node.background','rgba(255,128,0,1)');
  1131. Lib_56Node11.a('node.gradient','');
  1132. Lib_56Node11.a('node.gradientcolor','rgba(255,128,0,1)');
  1133. Lib_56Node11.a('node.endCompspts',Lib_56Node11endCompspts);
  1134. Lib_56Node11.a('node.startCompspts',Lib_56Node11startCompspts);
  1135. (function (node, img, compspts, endCompspts, startCompspts) {
  1136. var position = node.getPosition(),
  1137. w = node.getWidth()*_ratio.ratioX,
  1138. h = node.getHeight()*_ratio.ratioY;
  1139. function resetPoints(rx, ry) {
  1140. for (var i = 0, len = compspts.length; i < len; i++) {
  1141. if (i%2 === 0) {
  1142. compspts[i]*=rx;
  1143. } else {
  1144. compspts[i]*=ry;
  1145. }
  1146. }
  1147. endCompspts[0] = compspts[compspts.length-2];
  1148. endCompspts[1] = compspts[compspts.length-1];
  1149. endCompspts[2] *= rx;
  1150. endCompspts[3] *= ry;
  1151. node.a('node.offsetEndY', -(endCompspts[3]*0.5));
  1152. node.a('node.offsetEndX', -(endCompspts[2]*0.5));
  1153. startCompspts[0] = compspts[0];
  1154. startCompspts[1] = compspts[1];
  1155. startCompspts[2] *= rx;
  1156. startCompspts[3] *= ry;
  1157. node.a('node.offsetStartY', -(startCompspts[3]*0.5));
  1158. node.a('node.offsetStartX', -(startCompspts[2]*0.5));
  1159. node.a('node.endRotation', GD.calcRotationByStartAndEnd(compspts[i-4], compspts[i-3], compspts[i-2], compspts[i-1]));
  1160. node.a('node.startRotation', GD.calcRotationByStartAndEnd(compspts[0], compspts[1], compspts[2], compspts[3]) + Math.PI);
  1161. }
  1162. node.setSize(w, h);
  1163. node.setPosition(position.x * ratio.ratioX, position.y * ratio.ratioY);
  1164. node.a('node.width', w);
  1165. node.a('node.height', h);
  1166. resetPoints(_ratio.ratioX, _ratio.ratioY);
  1167. node.borderWidth = 2;
  1168. node.a('node.borderwidth',node.borderWidth);
  1169. node._nodename = 'Lib_56Node11';
  1170. node._nodeType = 'line';
  1171. zoomNodeList.push({
  1172. node: node,
  1173. attr: 'node.borderwidth'
  1174. });
  1175. var setWidth = node.setWidth,
  1176. setHeight = node.setHeight,
  1177. timer, rx = 1, ry = 1;
  1178. node.setWidth = function (width) {
  1179. var _width = this.getWidth();
  1180. rx = width / _width;
  1181. node.a('node.width', width);
  1182. setWidth.apply(this, arguments);
  1183. resetPoints(rx, 1);
  1184. }
  1185. node.setHeight = function (height) {
  1186. var _height = this.getHeight();
  1187. ry = height / _height;
  1188. node.a('node.height', height);
  1189. setHeight.apply(this, arguments);
  1190. resetPoints(1, ry);
  1191. }
  1192. })(Lib_56Node11, Lib_56Node11.getImage(), Lib_56Node11compspts, Lib_56Node11endCompspts, Lib_56Node11startCompspts);
  1193. /*@GraphList@*/
  1194. /*@PageInit@*/
  1195. var localVarObj = this.localVarObj;
  1196. var localDynamicVarObj = this.localDynamicVar();
  1197. this['Lib_56Node0'] = Lib_56Node0;
  1198. Lib_56Node0.__parentLib = nodename;
  1199. Lib_56Node0.__parent = this;
  1200. this.childNodes.push(Lib_56Node0);
  1201. this['Lib_56Node1'] = Lib_56Node1;
  1202. Lib_56Node1.__parentLib = nodename;
  1203. Lib_56Node1.__parent = this;
  1204. this.childNodes.push(Lib_56Node1);
  1205. this['Lib_56Node2'] = Lib_56Node2;
  1206. Lib_56Node2.__parentLib = nodename;
  1207. Lib_56Node2.__parent = this;
  1208. this.childNodes.push(Lib_56Node2);
  1209. this['Lib_56Node3'] = Lib_56Node3;
  1210. Lib_56Node3.__parentLib = nodename;
  1211. Lib_56Node3.__parent = this;
  1212. this.childNodes.push(Lib_56Node3);
  1213. this['Lib_56Node4'] = Lib_56Node4;
  1214. Lib_56Node4.__parentLib = nodename;
  1215. Lib_56Node4.__parent = this;
  1216. this.childNodes.push(Lib_56Node4);
  1217. this['Lib_56Node5'] = Lib_56Node5;
  1218. Lib_56Node5.__parentLib = nodename;
  1219. Lib_56Node5.__parent = this;
  1220. this.childNodes.push(Lib_56Node5);
  1221. this['Lib_56Node6'] = Lib_56Node6;
  1222. Lib_56Node6.__parentLib = nodename;
  1223. Lib_56Node6.__parent = this;
  1224. this.childNodes.push(Lib_56Node6);
  1225. this['Lib_56Node7'] = Lib_56Node7;
  1226. Lib_56Node7.__parentLib = nodename;
  1227. Lib_56Node7.__parent = this;
  1228. this.childNodes.push(Lib_56Node7);
  1229. this['Lib_56Node8'] = Lib_56Node8;
  1230. Lib_56Node8.__parentLib = nodename;
  1231. Lib_56Node8.__parent = this;
  1232. this.childNodes.push(Lib_56Node8);
  1233. this['Lib_56Node9'] = Lib_56Node9;
  1234. Lib_56Node9.__parentLib = nodename;
  1235. Lib_56Node9.__parent = this;
  1236. this.childNodes.push(Lib_56Node9);
  1237. this['Lib_56Node10'] = Lib_56Node10;
  1238. Lib_56Node10.__parentLib = nodename;
  1239. Lib_56Node10.__parent = this;
  1240. this.childNodes.push(Lib_56Node10);
  1241. this['Lib_56Node11'] = Lib_56Node11;
  1242. Lib_56Node11.__parentLib = nodename;
  1243. Lib_56Node11.__parent = this;
  1244. this.childNodes.push(Lib_56Node11);
  1245. /*@ControlContextMenu@*/
  1246. /*@Declare@*/
  1247. this.init(x, y, width, height, angle);
  1248. };
  1249. ht.Default.def('ht.lib.56', Object, {
  1250. refresh10ms: function () {
  1251. var localVarObj = this.localVarObj;
  1252. var localDynamicVarObj = this.localDynamicVar();
  1253. var Lib_56Node0= this.Lib_56Node0;
  1254. var Lib_56Node1= this.Lib_56Node1;
  1255. var Lib_56Node2= this.Lib_56Node2;
  1256. var Lib_56Node3= this.Lib_56Node3;
  1257. var Lib_56Node4= this.Lib_56Node4;
  1258. var Lib_56Node5= this.Lib_56Node5;
  1259. var Lib_56Node6= this.Lib_56Node6;
  1260. var Lib_56Node7= this.Lib_56Node7;
  1261. var Lib_56Node8= this.Lib_56Node8;
  1262. var Lib_56Node9= this.Lib_56Node9;
  1263. var Lib_56Node10= this.Lib_56Node10;
  1264. var Lib_56Node11= this.Lib_56Node11;
  1265. /*@refresh10ms@*/
  1266. },
  1267. refresh100ms: function () {
  1268. var localVarObj = this.localVarObj;
  1269. var localDynamicVarObj = this.localDynamicVar();
  1270. var Lib_56Node0= this.Lib_56Node0;
  1271. var Lib_56Node1= this.Lib_56Node1;
  1272. var Lib_56Node2= this.Lib_56Node2;
  1273. var Lib_56Node3= this.Lib_56Node3;
  1274. var Lib_56Node4= this.Lib_56Node4;
  1275. var Lib_56Node5= this.Lib_56Node5;
  1276. var Lib_56Node6= this.Lib_56Node6;
  1277. var Lib_56Node7= this.Lib_56Node7;
  1278. var Lib_56Node8= this.Lib_56Node8;
  1279. var Lib_56Node9= this.Lib_56Node9;
  1280. var Lib_56Node10= this.Lib_56Node10;
  1281. var Lib_56Node11= this.Lib_56Node11;
  1282. /*@refresh100ms@*/
  1283. },
  1284. refresh500ms: function () {
  1285. var localVarObj = this.localVarObj;
  1286. var localDynamicVarObj = this.localDynamicVar();
  1287. var Lib_56Node0= this.Lib_56Node0;
  1288. var Lib_56Node1= this.Lib_56Node1;
  1289. var Lib_56Node2= this.Lib_56Node2;
  1290. var Lib_56Node3= this.Lib_56Node3;
  1291. var Lib_56Node4= this.Lib_56Node4;
  1292. var Lib_56Node5= this.Lib_56Node5;
  1293. var Lib_56Node6= this.Lib_56Node6;
  1294. var Lib_56Node7= this.Lib_56Node7;
  1295. var Lib_56Node8= this.Lib_56Node8;
  1296. var Lib_56Node9= this.Lib_56Node9;
  1297. var Lib_56Node10= this.Lib_56Node10;
  1298. var Lib_56Node11= this.Lib_56Node11;
  1299. /*@refresh500ms@*/
  1300. },
  1301. refresh1s: function () {
  1302. var Counter1s = arguments[0] || 0;
  1303. var localVarObj = this.localVarObj;
  1304. var localDynamicVarObj = this.localDynamicVar();
  1305. var Lib_56Node0= this.Lib_56Node0;
  1306. var Lib_56Node1= this.Lib_56Node1;
  1307. var Lib_56Node2= this.Lib_56Node2;
  1308. var Lib_56Node3= this.Lib_56Node3;
  1309. var Lib_56Node4= this.Lib_56Node4;
  1310. var Lib_56Node5= this.Lib_56Node5;
  1311. var Lib_56Node6= this.Lib_56Node6;
  1312. var Lib_56Node7= this.Lib_56Node7;
  1313. var Lib_56Node8= this.Lib_56Node8;
  1314. var Lib_56Node9= this.Lib_56Node9;
  1315. var Lib_56Node10= this.Lib_56Node10;
  1316. var Lib_56Node11= this.Lib_56Node11;
  1317. /*@refresh1s@*/
  1318. },
  1319. refresh5s: function () {
  1320. var localVarObj = this.localVarObj;
  1321. var localDynamicVarObj = this.localDynamicVar();
  1322. var Lib_56Node0= this.Lib_56Node0;
  1323. var Lib_56Node1= this.Lib_56Node1;
  1324. var Lib_56Node2= this.Lib_56Node2;
  1325. var Lib_56Node3= this.Lib_56Node3;
  1326. var Lib_56Node4= this.Lib_56Node4;
  1327. var Lib_56Node5= this.Lib_56Node5;
  1328. var Lib_56Node6= this.Lib_56Node6;
  1329. var Lib_56Node7= this.Lib_56Node7;
  1330. var Lib_56Node8= this.Lib_56Node8;
  1331. var Lib_56Node9= this.Lib_56Node9;
  1332. var Lib_56Node10= this.Lib_56Node10;
  1333. var Lib_56Node11= this.Lib_56Node11;
  1334. /*@refresh5s@*/
  1335. },
  1336. /*@PageDynamic@*/
  1337. onEvent: function (e, data, type, origin, offset, objMouseOn, ctm) {
  1338. var localVarObj = this.localVarObj;
  1339. var localDynamicVarObj = this.localDynamicVar();
  1340. var Lib_56Node0= this.Lib_56Node0;
  1341. var Lib_56Node1= this.Lib_56Node1;
  1342. var Lib_56Node2= this.Lib_56Node2;
  1343. var Lib_56Node3= this.Lib_56Node3;
  1344. var Lib_56Node4= this.Lib_56Node4;
  1345. var Lib_56Node5= this.Lib_56Node5;
  1346. var Lib_56Node6= this.Lib_56Node6;
  1347. var Lib_56Node7= this.Lib_56Node7;
  1348. var Lib_56Node8= this.Lib_56Node8;
  1349. var Lib_56Node9= this.Lib_56Node9;
  1350. var Lib_56Node10= this.Lib_56Node10;
  1351. var Lib_56Node11= this.Lib_56Node11;
  1352. if (type === 'click') {
  1353. /*@EvnentClicked@*/
  1354. } else if (type === 'mousedown') {
  1355. mouseX=e.clientX;
  1356. mouseY=e.clientY;
  1357. /*@EvnentMouseDown@*/
  1358. } else if (type === 'mouseup') {
  1359. /*@EvnentMouseUp@*/
  1360. } else if (type === 'mousemove') {
  1361. var mouseX, mouseY, position, zoom;
  1362. position=origin.getLogicalPoint(e);
  1363. zoom = graphView.getZoom();
  1364. if (origin === graphView) {
  1365. mouseX= position.x + origin.tx();
  1366. mouseY = position.y + origin.ty();
  1367. } else {
  1368. offset = offset || {x: 0, y: 0};
  1369. mouseX = position.x / zoom + offset.x + origin.tx();
  1370. mouseY = position.y / zoom + offset.y + origin.ty();
  1371. }
  1372. /*@EvnentMouseLeave@*/
  1373. /*@EvnentMouseOver@*/
  1374. } else if (type === 'keydown') {
  1375. /*@EvnentKeyDown@*/
  1376. } else if (type === 'contextmenu') {
  1377. /*@Declare@*/
  1378. /*@SetNodeContextMenu@*/
  1379. /*@SetPageContextMenu@*/
  1380. }
  1381. /*@LibEvent@*/
  1382. },
  1383. getBaseClass: function () {
  1384. return this._baseClass;
  1385. },
  1386. getWidth: function () {
  1387. return this._width;
  1388. },
  1389. getHeight: function () {
  1390. return this._height;
  1391. },
  1392. getSize: function () {
  1393. return {
  1394. width: this._width,
  1395. height: this._height
  1396. }
  1397. },
  1398. setWidth: function (width) {
  1399. if (width === undefined || width === null || width != width) {
  1400. return ;
  1401. }
  1402. var originWidth = this._width;
  1403. var ratio = width / originWidth;
  1404. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), w, cw, ox, rotation = this.getRotation();
  1405. for (var i = 0, len = childNodes.length; i < len; i++) {
  1406. childNode = childNodes[i];
  1407. p = childNode.getPosition();
  1408. cw = childNode.getWidth();
  1409. w = cw >=2 ? cw * ratio : cw;
  1410. childNode.setWidth(w);
  1411. ox = op.x + (p.x - op.x) * ratio;
  1412. childNode.setPosition(ox, p.y);
  1413. rotation = GD.calcRotation(rotation);
  1414. if (rotation === 0 || rotation === Math.PI) {
  1415. // 图元未旋转
  1416. ox = op.x + (p.x - op.x)*ratio;
  1417. childNode.setPosition(ox, p.y);
  1418. } else if (rotation === 90 * Math.PI / 180) {
  1419. // 图元旋转以后
  1420. ox = op.y + (p.y - op.y)*ratio;
  1421. childNode.setPosition(p.x, ox);
  1422. }
  1423. }
  1424. this._width = width;
  1425. this._originWidth = width;
  1426. this._ratioX = ratio;
  1427. return this;
  1428. },
  1429. setHeight: function (height) {
  1430. if (height === undefined || height === null || height != height) {
  1431. return ;
  1432. }
  1433. var originHeight = this._height;
  1434. var ratio = height / originHeight;
  1435. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), h, ch, oy, rotation = this.getRotation();
  1436. for (var i = 0, len = childNodes.length; i < len; i++) {
  1437. childNode = childNodes[i];
  1438. p = childNode.getPosition();
  1439. ch = childNode.getHeight();
  1440. h = ch >=2 ? ch * ratio : ch;
  1441. childNode.setHeight(h);
  1442. rotation = GD.calcRotation(rotation);
  1443. if (rotation === 0 || rotation === Math.PI) {
  1444. // 图元未旋转
  1445. oy = op.y + (p.y - op.y)*ratio;
  1446. childNode.setPosition(p.x, oy);
  1447. } else if (rotation === 90 * Math.PI / 180) {
  1448. // 图元旋转以后
  1449. oy = op.x + (p.x - op.x)*ratio;
  1450. childNode.setPosition(oy, p.y);
  1451. }
  1452. }
  1453. this._height = height;
  1454. this._originHeight = height;
  1455. this._ratioY = ratio;
  1456. return this;
  1457. },
  1458. setSize: function (size) {
  1459. // var args = Array.prototype.slice.call(arguments, 0);
  1460. // var height, width;
  1461. // if (args.length === 0) {
  1462. // return ;
  1463. // }else if (args.length === 1) {
  1464. // height = args[0].height;
  1465. // width = args[0].width;
  1466. // } else {
  1467. // width = args[0];
  1468. // height = args[1];
  1469. // }
  1470. // var wh = GD.getRatioWithRotation(angle, wid)
  1471. // this.setHeight(height);
  1472. // this.setWidth(width);
  1473. // return this;
  1474. var args = Array.prototype.slice.call(arguments, 0);
  1475. var height, width;
  1476. if (args.length === 0) {
  1477. return ;
  1478. }else if (args.length === 1) {
  1479. height = args[0].height;
  1480. width = args[0].width;
  1481. angle = 0;
  1482. } else if (args.length === 2) {
  1483. if (typeof args[0] === 'object') {
  1484. width = args[0].width;
  1485. height = args[0].height;
  1486. angle = args[1] || 0;
  1487. } else {
  1488. width = args[0];
  1489. height = args[1];
  1490. angle = 0;
  1491. }
  1492. } else if (args.length === 3) {
  1493. width = args[0];
  1494. height = args[1];
  1495. angle = args[2] || 0;
  1496. }
  1497. var wh = GD.getRatioWithRotation(0, width, height);
  1498. this.setHeight(wh.ratioY);
  1499. this.setWidth(wh.ratioX);
  1500. return this;
  1501. },
  1502. getPosition: function () {
  1503. return {
  1504. x: this._x,
  1505. y: this._y
  1506. }
  1507. },
  1508. setPosition: function () {
  1509. var args = Array.prototype.slice.call(arguments, 0), x, y;
  1510. if (args.length === 0) {
  1511. return this;
  1512. } else if (args.length === 1) {
  1513. if (typeof args[0] != 'object') {
  1514. return this;
  1515. }
  1516. x = args[0].x;
  1517. y = args[0].y;
  1518. } else {
  1519. x = args[0];
  1520. y = args[1];
  1521. }
  1522. if ((x !== 0 && !x) || (y !== 0 && !y)) {
  1523. return this;
  1524. }
  1525. // var childNodes = this.childNodes, offset, childNode, p;
  1526. // for (var i = 0, len = childNodes.length; i < len; i++) {
  1527. // childNode = childNodes[i];
  1528. // p = childNode.getPosition();
  1529. // childNode.setPosition(x - (this._x-p.x)*this._ratioX, y - (this._y-p.y)*this._ratioY);
  1530. // }
  1531. // this._x = x;
  1532. // this._y = y;
  1533. // return this;
  1534. var childNodes, childNode, background, offset = {}, op, cp;
  1535. childNodes = this.childNodes;
  1536. background = this._background;
  1537. op = background.getPosition();
  1538. offset.x = x - op.x;
  1539. offset.y = y - op.y;
  1540. for (var i = 0, len = childNodes.length; i < len; i++) {
  1541. childNode = childNodes[i];
  1542. cp = childNode.getPosition();
  1543. childNode.setPosition(cp.x + offset.x, cp.y + offset.y);
  1544. }
  1545. this._x = x;
  1546. this._y = y;
  1547. this._position = {x: x, y: y};
  1548. return this;
  1549. },
  1550. getStyle: function (key) {
  1551. if (!key) {
  1552. return undefined;
  1553. }
  1554. return this._styleObject[key];
  1555. },
  1556. setStyle: function (key, value, force) {
  1557. var childNodes = this.childNodes, childNode;
  1558. for (var i = 0, len = childNodes.length; i < len; i++) {
  1559. childNode = childNodes[i];
  1560. if (key === '2d.visible') {
  1561. if (value === graphView.isVisible(childNode)) {
  1562. continue;
  1563. }
  1564. if (!value) {
  1565. childNode._savedIsVisible = graphView.isVisible(childNode);
  1566. childNode.s({
  1567. '2d.visible': false
  1568. })
  1569. } else {
  1570. childNode.s({
  1571. '2d.visible': childNode._savedIsVisible
  1572. })
  1573. }
  1574. continue;
  1575. }
  1576. childNode.s({
  1577. key: value
  1578. });
  1579. }
  1580. this._styleObject[key] = value;
  1581. return this;
  1582. },
  1583. calcSize: function () {
  1584. var background = this._background;
  1585. var position = background.getPosition(),
  1586. width = background.getWidth(),
  1587. height = background.getHeight();
  1588. this._width = width;
  1589. this._height = height;
  1590. this._x = position.x;
  1591. this._y = position.y;
  1592. this._position = {
  1593. x: this._x,
  1594. y: this._y
  1595. }
  1596. return this;
  1597. return this;
  1598. },
  1599. s: function (styleObj, force) {
  1600. var args = Array.prototype.slice.call(arguments, 0);
  1601. var styleObj;
  1602. if (args.length === 0) {
  1603. return this;
  1604. } else if (args.length === 1) {
  1605. styleObj = args[0];
  1606. } else {
  1607. this.setStyle(args[0], args[1]);
  1608. return this;
  1609. }
  1610. for (var key in styleObj) {
  1611. if (!styleObj.hasOwnProperty(key)) {
  1612. continue;
  1613. }
  1614. this.setStyle(key, styleObj[key], force);
  1615. }
  1616. return this;
  1617. },
  1618. init: function (x, y, width, height, angle) {
  1619. var that = this;
  1620. this.calcSize();
  1621. (function (width, height, angle) {
  1622. // that.setSize(width, height, angle);
  1623. // var wh = GD.getRatioWithRotation(angle, width, height);
  1624. // width = wh.ratioX;
  1625. // height = wh.ratioY;
  1626. var originHeight = that._height;
  1627. var originWidth = that._width;
  1628. var ratioY = height / originHeight;
  1629. var ratioX = width / originWidth;
  1630. var childNodes = that.childNodes,
  1631. childNode,p, op = that.getPosition(), h, ch, oy, w, cw, ox, name, borderRatio, borderWidth;
  1632. for (var i = 0, len = childNodes.length; i < len; i++) {
  1633. childNode = childNodes[i];
  1634. p = childNode.getPosition();
  1635. childNode.originHeight = childNode.originHeight || childNode.getHeight();
  1636. ch = childNode.getHeight();
  1637. cw = childNode.getWidth();
  1638. if (ch > 2) {
  1639. h = ch * ratioY;
  1640. childNode.setHeight(h);
  1641. }
  1642. if (cw > 2) {
  1643. w = cw * ratioX;
  1644. childNode.setWidth(w);
  1645. }
  1646. borderRatio = (ratioX + ratioY)*0.5;
  1647. if (childNode._nodeType === 'line') { // 如果是线,
  1648. if (childNode.getWidth() > childNode.getHeight()) {
  1649. borderRatio = ratioX;
  1650. } else {
  1651. borderRatio = ratioY;
  1652. }
  1653. }
  1654. name = childNode._nodename;
  1655. // if (childNode.borderWidth && name && ch > 2 && cw > 2) {
  1656. // borderWidth = childNode.borderWidth / borderRatio;
  1657. // if (borderWidth > ch*0.5 || borderWidth > cw *0.5) {
  1658. // // borderWidth = childNode.borderWidth;
  1659. // }
  1660. // childNode.borderWidth = borderWidth;
  1661. // childNode.a(name + '.borderwidth', borderWidth);
  1662. // }
  1663. }
  1664. that._height = height;
  1665. that._originHeight = height;
  1666. that._ratioY = ratioY;
  1667. that._width = width;
  1668. that._originWidth = width;
  1669. that._ratioX = ratioX;
  1670. })(width, height, angle);
  1671. that._x = width / 2;
  1672. that._y = height / 2;
  1673. that._rotation = 0;
  1674. // that.setPosition(x, y);
  1675. (function (x, y) {
  1676. var childNodes = that.childNodes, offset, childNode;
  1677. var w2 = that.getWidth() / 2, h2 = that.getHeight()/2;
  1678. for (var i = 0, len = childNodes.length; i < len; i++) {
  1679. childNode = childNodes[i];
  1680. offset = childNode.getPosition();
  1681. childNode.setPosition(x + offset.x * that._ratioX - w2, y + offset.y * that._ratioY - h2);
  1682. }
  1683. that._x = x;
  1684. that._y = y;
  1685. })(x, y);
  1686. // setTimeout(that.addEVent, 1000);
  1687. },
  1688. setRotation: function (angle) {
  1689. var that = this, _angle = that.getRotation();
  1690. if (angle!==0 && !angle || angle === _angle) {
  1691. return this;
  1692. }
  1693. var childNodes = this.childNodes, childNode, p = this.getPosition(), px = p.x, py = p.y;
  1694. for (var i = 0, len = childNodes.length; i < len; i++) {
  1695. childNode = childNodes[i];
  1696. var x = childNode.getPosition().x - px;
  1697. var y = childNode.getPosition().y - py;
  1698. childNode.setPosition(Math.cos(angle-_angle) * x - Math.sin(angle-_angle) * y + px, Math.cos(angle-_angle) * y + Math.sin(angle-_angle) * x + py);
  1699. childNode.setRotation(angle);
  1700. }
  1701. this._rotation = angle;
  1702. return this;
  1703. },
  1704. getRotation: function () {
  1705. return this._rotation;
  1706. },
  1707. setScale: function (sx, sy) {
  1708. var that = this,
  1709. childNodes = this.childNodes,
  1710. childNode;
  1711. if (sx === undefined || sx === null) return ;
  1712. if (sy === undefined || sy === null) {
  1713. sy = sx;
  1714. }
  1715. for (var i = 0, len = childNodes.length; i < len; i++) {
  1716. childNode = childNodes[i];
  1717. if (typeof childNode.setScale === 'function') {
  1718. childNode.setScale(sx, sy);
  1719. }
  1720. }
  1721. },
  1722. getScale: function () {
  1723. return this._background.getScale();
  1724. },
  1725. setScaleX: function (sx) {
  1726. if (sx === undefined || sx === null) return;
  1727. var that = this,
  1728. childNodes = this.childNodes,
  1729. childNode;
  1730. for (var i = 0, len = childNodes.length; i < len; i++) {
  1731. childNode = childNodes[i];
  1732. if (typeof childNode.setScaleX === 'function') {
  1733. childNode.setScaleX(sx);
  1734. }
  1735. }
  1736. },
  1737. setScaleY: function (sy) {
  1738. if (sy === undefined || sy === null) return;
  1739. var that = this,
  1740. childNodes = this.childNodes,
  1741. childNode;
  1742. for (var i = 0, len = childNodes.length; i < len; i++) {
  1743. childNode = childNodes[i];
  1744. if (typeof childNode.setScaleY === 'function') {
  1745. childNode.setScaleY(sy);
  1746. }
  1747. }
  1748. },
  1749. getScaleX: function () {
  1750. return this._background.getScaleX();
  1751. },
  1752. getScaleY: function () {
  1753. return this._background.getScaleY();
  1754. },
  1755. evert: function () {
  1756. var that = this,
  1757. childNodes = this.childNodes,
  1758. background = this._background,
  1759. bp = background.getPosition(),
  1760. bx = bp.x,
  1761. by = bp.y,
  1762. childNode, distanceX, distanceY, x, y, p, nx, ny;
  1763. for (var i = 0, len = childNodes.length; i < len; i++) {
  1764. childNode = childNodes[i];
  1765. p = childNode.getPosition();
  1766. x = p.x;
  1767. y = p.y;
  1768. distanceX = bx - x;
  1769. distanceY = by - y;
  1770. nx = bx + distanceX;
  1771. ny = by + distanceY;
  1772. childNode.setPosition(nx, ny);
  1773. if (typeof childNode.setScale === 'function') {
  1774. if (!(childNode._disallowEvert === true))
  1775. childNode.setScale(-1, -1);
  1776. }
  1777. }
  1778. },
  1779. evertX: function () {
  1780. var that = this,
  1781. childNodes = this.childNodes,
  1782. background = this._background,
  1783. bx = background.getPosition().x,
  1784. childNode, distance, x, p, nx;
  1785. for (var i = 0, len = childNodes.length; i < len; i++) {
  1786. childNode = childNodes[i];
  1787. p = childNode.getPosition();
  1788. x = p.x;
  1789. distance = bx - x;
  1790. nx = bx + distance;
  1791. childNode.setPosition(nx, p.y);
  1792. if (typeof childNode.setScaleX === 'function') {
  1793. if (!(childNode._disallowEvert === true))
  1794. childNode.setScaleX(-1);
  1795. }
  1796. }
  1797. },
  1798. evertY: function () {
  1799. var that = this,
  1800. childNodes = this.childNodes,
  1801. background = this._background,
  1802. by = background.getPosition().y,
  1803. childNode, distance, y, p, ny;
  1804. for (var i = 0, len = childNodes.length; i < len; i++) {
  1805. childNode = childNodes[i];
  1806. p = childNode.getPosition();
  1807. y = p.y;
  1808. distance = by - y;
  1809. ny = by + distance;
  1810. childNode.setPosition(p.x, ny);
  1811. if (typeof childNode.setScaleY === 'function') {
  1812. if (!(childNode._disallowEvert === true))
  1813. childNode.setScaleY(-1);
  1814. }
  1815. }
  1816. },
  1817. attr: function (key, value) {
  1818. var _attrObj = this._attrObj || {};
  1819. if (arguments.length === 1) {
  1820. return _attrObj[key];
  1821. }
  1822. var childNodes = this.childNodes, childNode;
  1823. _attrObj[key] = value;
  1824. for (var i = 0; childNode = childNodes[i++];) {
  1825. if (typeof childNode.a === 'function') {
  1826. childNode.a(key, value);
  1827. }
  1828. }
  1829. },
  1830. a: function () {
  1831. return this.attr.apply(this, arguments);
  1832. }
  1833. });
  1834. }