矩阵.js 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249
  1. ht.lib = ht.lib || {};
  2. if (!ht.lib['矩阵']) {
  3. ht.lib['矩阵'] = function (x, y, width, height, angle, localVarObj, localDynamicVar, nodename) {
  4. _ratio = GD.getRatioWithRotation(0, ratio);
  5. ht.lib['矩阵'].superClass.constructor.apply(this);
  6. this.localVarObj = localVarObj;
  7. this.localDynamicVar = localDynamicVar;
  8. this.childNodes = [];
  9. this._styleObject = {};
  10. this._originWidth = 54*_ratio.ratioX;
  11. this._originHeight = 19*_ratio.ratioY;
  12. this._baseClass = "ht.lib.矩阵";
  13. this._background = new ht.Node();
  14. this._background.setWidth(this._originWidth);
  15. this._background.setHeight(this._originHeight);
  16. this._background.setPosition(this._originWidth/2, this._originHeight/2);
  17. this._background.setImage({
  18. width: width,
  19. height: height,
  20. clip: true,
  21. comps: [
  22. {
  23. type: 'rect',
  24. background: 'rgba(0,255,0,0)',
  25. rect: [0,0,width, height]
  26. }
  27. ]
  28. });
  29. this._background.__parentLib = nodename;
  30. this._background.isLibBackground = true;
  31. this.childNodes.push(this._background);
  32. dataModel.add(this._background);
  33. /*@PageBackgroundInit@*/
  34. /*@PageBeforeInit@*/
  35. _ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  36. var Lib_矩阵Node0_0type = 'rect';
  37. var Lib_矩阵Node0_0 = new ht.Node(),
  38. Lib_矩阵Node0_0BorderWidth = 1*2;
  39. if (Lib_矩阵Node0_0type === 'arc') {
  40. Lib_矩阵Node0_0BorderWidth *= 1;
  41. }
  42. Lib_矩阵Node0_0.setImage(GD.getRectJSON(54*_ratio.ratioX, 19*_ratio.ratioY, Lib_矩阵Node0_0type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  43. Lib_矩阵Node0_0.setPosition(27*ratio.ratioX, 9*ratio.ratioY);
  44. Lib_矩阵Node0_0.setSize(54*_ratio.ratioX, 19*_ratio.ratioY);
  45. Lib_矩阵Node0_0.s({
  46. 'pixelPerfect':true
  47. /*@AddPara@*/
  48. });
  49. Lib_矩阵Node0_0.a('node.width', 54*_ratio.ratioX);
  50. Lib_矩阵Node0_0.a('node.height', 19*_ratio.ratioY);
  51. Lib_矩阵Node0_0.a('node.type', Lib_矩阵Node0_0type);
  52. Lib_矩阵Node0_0.a('node.rect', [0, 0, 54*_ratio.ratioX, 19*_ratio.ratioY]);
  53. Lib_矩阵Node0_0.a('node.background', 'rgba(108,178,13,1)');
  54. Lib_矩阵Node0_0.a('node.gradientcolor', 'rgba(108,178,13,1)');
  55. Lib_矩阵Node0_0.a('node.gradient', '');
  56. Lib_矩阵Node0_0.a('node.borderwidth', Lib_矩阵Node0_0BorderWidth);
  57. Lib_矩阵Node0_0.a('node.color', 'rgba(108,178,13,1)');
  58. Lib_矩阵Node0_0.a('node.fillrect', [0,0,0,0]);
  59. Lib_矩阵Node0_0.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  60. Lib_矩阵Node0_0.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  61. Lib_矩阵Node0_0.a('node.fillgradient', '');
  62. if (Lib_矩阵Node0_0type !== 'rect') {
  63. Lib_矩阵Node0_0.a('node.arcFrom', parseFloat('@arcFrom@'));
  64. Lib_矩阵Node0_0.a('node.arcTo', parseFloat('@arcTo@'));
  65. Lib_矩阵Node0_0.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  66. }
  67. if (Lib_矩阵Node0_0type === 'arc') {
  68. Lib_矩阵Node0_0.a('node.arcOval', true);
  69. }
  70. Lib_矩阵Node0_0.setRotation(0*Math.PI/180);
  71. Lib_矩阵Node0_0.borderWidth = Lib_矩阵Node0_0BorderWidth;
  72. Lib_矩阵Node0_0.borderFillwidth = Lib_矩阵Node0_0BorderWidth;
  73. dataModel.add(Lib_矩阵Node0_0);
  74. Lib_矩阵Node0_0._nodename = 'Lib_矩阵Node0_0'
  75. Lib_矩阵Node0_0._nodeType = 'rect';
  76. zoomNodeList.push({
  77. node: Lib_矩阵Node0_0,
  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_矩阵Node0_0, Lib_矩阵Node0_0.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  98. var Lib_矩阵Node0_1type = 'rect';
  99. var Lib_矩阵Node0_1 = new ht.Node(),
  100. Lib_矩阵Node0_1BorderWidth = 1*2;
  101. if (Lib_矩阵Node0_1type === 'arc') {
  102. Lib_矩阵Node0_1BorderWidth *= 1;
  103. }
  104. Lib_矩阵Node0_1.setImage(GD.getRectJSON(54*_ratio.ratioX, 19*_ratio.ratioY, Lib_矩阵Node0_1type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  105. Lib_矩阵Node0_1.setPosition(27*ratio.ratioX, 9*ratio.ratioY);
  106. Lib_矩阵Node0_1.setSize(54*_ratio.ratioX, 19*_ratio.ratioY);
  107. Lib_矩阵Node0_1.s({
  108. 'pixelPerfect':true
  109. /*@AddPara@*/
  110. });
  111. Lib_矩阵Node0_1.a('node.width', 54*_ratio.ratioX);
  112. Lib_矩阵Node0_1.a('node.height', 19*_ratio.ratioY);
  113. Lib_矩阵Node0_1.a('node.type', Lib_矩阵Node0_1type);
  114. Lib_矩阵Node0_1.a('node.rect', [0, 0, 54*_ratio.ratioX, 19*_ratio.ratioY]);
  115. Lib_矩阵Node0_1.a('node.background', 'rgba(146,156,163,1)');
  116. Lib_矩阵Node0_1.a('node.gradientcolor', 'rgba(146,156,163,1)');
  117. Lib_矩阵Node0_1.a('node.gradient', '');
  118. Lib_矩阵Node0_1.a('node.borderwidth', Lib_矩阵Node0_1BorderWidth);
  119. Lib_矩阵Node0_1.a('node.color', 'rgba(146,156,163,1)');
  120. Lib_矩阵Node0_1.a('node.fillrect', [0,0,0,0]);
  121. Lib_矩阵Node0_1.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  122. Lib_矩阵Node0_1.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  123. Lib_矩阵Node0_1.a('node.fillgradient', '');
  124. if (Lib_矩阵Node0_1type !== 'rect') {
  125. Lib_矩阵Node0_1.a('node.arcFrom', parseFloat('@arcFrom@'));
  126. Lib_矩阵Node0_1.a('node.arcTo', parseFloat('@arcTo@'));
  127. Lib_矩阵Node0_1.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  128. }
  129. if (Lib_矩阵Node0_1type === 'arc') {
  130. Lib_矩阵Node0_1.a('node.arcOval', true);
  131. }
  132. Lib_矩阵Node0_1.setRotation(0*Math.PI/180);
  133. Lib_矩阵Node0_1.borderWidth = Lib_矩阵Node0_1BorderWidth;
  134. Lib_矩阵Node0_1.borderFillwidth = Lib_矩阵Node0_1BorderWidth;
  135. dataModel.add(Lib_矩阵Node0_1);
  136. Lib_矩阵Node0_1._nodename = 'Lib_矩阵Node0_1'
  137. Lib_矩阵Node0_1._nodeType = 'rect';
  138. zoomNodeList.push({
  139. node: Lib_矩阵Node0_1,
  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_矩阵Node0_1, Lib_矩阵Node0_1.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  160. var Lib_矩阵Node0_2type = 'rect';
  161. var Lib_矩阵Node0_2 = new ht.Node(),
  162. Lib_矩阵Node0_2BorderWidth = 1*2;
  163. if (Lib_矩阵Node0_2type === 'arc') {
  164. Lib_矩阵Node0_2BorderWidth *= 1;
  165. }
  166. Lib_矩阵Node0_2.setImage(GD.getRectJSON(54*_ratio.ratioX, 19*_ratio.ratioY, Lib_矩阵Node0_2type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  167. Lib_矩阵Node0_2.setPosition(27*ratio.ratioX, 9*ratio.ratioY);
  168. Lib_矩阵Node0_2.setSize(54*_ratio.ratioX, 19*_ratio.ratioY);
  169. Lib_矩阵Node0_2.s({
  170. 'pixelPerfect':true
  171. /*@AddPara@*/
  172. });
  173. Lib_矩阵Node0_2.a('node.width', 54*_ratio.ratioX);
  174. Lib_矩阵Node0_2.a('node.height', 19*_ratio.ratioY);
  175. Lib_矩阵Node0_2.a('node.type', Lib_矩阵Node0_2type);
  176. Lib_矩阵Node0_2.a('node.rect', [0, 0, 54*_ratio.ratioX, 19*_ratio.ratioY]);
  177. Lib_矩阵Node0_2.a('node.background', 'rgba(169,60,140,1)');
  178. Lib_矩阵Node0_2.a('node.gradientcolor', 'rgba(169,60,140,1)');
  179. Lib_矩阵Node0_2.a('node.gradient', '');
  180. Lib_矩阵Node0_2.a('node.borderwidth', Lib_矩阵Node0_2BorderWidth);
  181. Lib_矩阵Node0_2.a('node.color', 'rgba(169,60,140,1)');
  182. Lib_矩阵Node0_2.a('node.fillrect', [0,0,0,0]);
  183. Lib_矩阵Node0_2.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  184. Lib_矩阵Node0_2.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  185. Lib_矩阵Node0_2.a('node.fillgradient', '');
  186. if (Lib_矩阵Node0_2type !== 'rect') {
  187. Lib_矩阵Node0_2.a('node.arcFrom', parseFloat('@arcFrom@'));
  188. Lib_矩阵Node0_2.a('node.arcTo', parseFloat('@arcTo@'));
  189. Lib_矩阵Node0_2.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  190. }
  191. if (Lib_矩阵Node0_2type === 'arc') {
  192. Lib_矩阵Node0_2.a('node.arcOval', true);
  193. }
  194. Lib_矩阵Node0_2.setRotation(0*Math.PI/180);
  195. Lib_矩阵Node0_2.borderWidth = Lib_矩阵Node0_2BorderWidth;
  196. Lib_矩阵Node0_2.borderFillwidth = Lib_矩阵Node0_2BorderWidth;
  197. dataModel.add(Lib_矩阵Node0_2);
  198. Lib_矩阵Node0_2._nodename = 'Lib_矩阵Node0_2'
  199. Lib_矩阵Node0_2._nodeType = 'rect';
  200. zoomNodeList.push({
  201. node: Lib_矩阵Node0_2,
  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_矩阵Node0_2, Lib_矩阵Node0_2.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  222. var Lib_矩阵Node0_3type = 'rect';
  223. var Lib_矩阵Node0_3 = new ht.Node(),
  224. Lib_矩阵Node0_3BorderWidth = 1*2;
  225. if (Lib_矩阵Node0_3type === 'arc') {
  226. Lib_矩阵Node0_3BorderWidth *= 1;
  227. }
  228. Lib_矩阵Node0_3.setImage(GD.getRectJSON(54*_ratio.ratioX, 19*_ratio.ratioY, Lib_矩阵Node0_3type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  229. Lib_矩阵Node0_3.setPosition(27*ratio.ratioX, 9*ratio.ratioY);
  230. Lib_矩阵Node0_3.setSize(54*_ratio.ratioX, 19*_ratio.ratioY);
  231. Lib_矩阵Node0_3.s({
  232. 'pixelPerfect':true
  233. /*@AddPara@*/
  234. });
  235. Lib_矩阵Node0_3.a('node.width', 54*_ratio.ratioX);
  236. Lib_矩阵Node0_3.a('node.height', 19*_ratio.ratioY);
  237. Lib_矩阵Node0_3.a('node.type', Lib_矩阵Node0_3type);
  238. Lib_矩阵Node0_3.a('node.rect', [0, 0, 54*_ratio.ratioX, 19*_ratio.ratioY]);
  239. Lib_矩阵Node0_3.a('node.background', 'rgba(219,51,51,1)');
  240. Lib_矩阵Node0_3.a('node.gradientcolor', 'rgba(219,51,51,1)');
  241. Lib_矩阵Node0_3.a('node.gradient', '');
  242. Lib_矩阵Node0_3.a('node.borderwidth', Lib_矩阵Node0_3BorderWidth);
  243. Lib_矩阵Node0_3.a('node.color', 'rgba(219,51,51,1)');
  244. Lib_矩阵Node0_3.a('node.fillrect', [0,0,0,0]);
  245. Lib_矩阵Node0_3.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  246. Lib_矩阵Node0_3.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  247. Lib_矩阵Node0_3.a('node.fillgradient', '');
  248. if (Lib_矩阵Node0_3type !== 'rect') {
  249. Lib_矩阵Node0_3.a('node.arcFrom', parseFloat('@arcFrom@'));
  250. Lib_矩阵Node0_3.a('node.arcTo', parseFloat('@arcTo@'));
  251. Lib_矩阵Node0_3.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  252. }
  253. if (Lib_矩阵Node0_3type === 'arc') {
  254. Lib_矩阵Node0_3.a('node.arcOval', true);
  255. }
  256. Lib_矩阵Node0_3.setRotation(0*Math.PI/180);
  257. Lib_矩阵Node0_3.borderWidth = Lib_矩阵Node0_3BorderWidth;
  258. Lib_矩阵Node0_3.borderFillwidth = Lib_矩阵Node0_3BorderWidth;
  259. dataModel.add(Lib_矩阵Node0_3);
  260. Lib_矩阵Node0_3._nodename = 'Lib_矩阵Node0_3'
  261. Lib_矩阵Node0_3._nodeType = 'rect';
  262. zoomNodeList.push({
  263. node: Lib_矩阵Node0_3,
  264. attr: 'node.borderwidth'
  265. });
  266. (function (node, _img) {
  267. var setWidth = node.setWidth,
  268. setHeight = node.setHeight;
  269. node.setWidth = function (width) {
  270. if (width === this.getWidth()) return ;
  271. var height = this.getHeight();
  272. this.a('node.width', width);
  273. this.a('node.rect', [0,0,width, height]);
  274. setWidth.apply(this, arguments);
  275. }
  276. node.setHeight = function (height) {
  277. if (height === this.getHeight()) return ;
  278. var width = this.getWidth();
  279. this.a('node.height', height);
  280. this.a('node.rect', [0,0,width, height]);
  281. setHeight.apply(this, arguments);
  282. }
  283. })(Lib_矩阵Node0_3, Lib_矩阵Node0_3.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  284. var Lib_矩阵Node0_4type = 'rect';
  285. var Lib_矩阵Node0_4 = new ht.Node(),
  286. Lib_矩阵Node0_4BorderWidth = 1*2;
  287. if (Lib_矩阵Node0_4type === 'arc') {
  288. Lib_矩阵Node0_4BorderWidth *= 1;
  289. }
  290. Lib_矩阵Node0_4.setImage(GD.getRectJSON(54*_ratio.ratioX, 19*_ratio.ratioY, Lib_矩阵Node0_4type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  291. Lib_矩阵Node0_4.setPosition(27*ratio.ratioX, 9*ratio.ratioY);
  292. Lib_矩阵Node0_4.setSize(54*_ratio.ratioX, 19*_ratio.ratioY);
  293. Lib_矩阵Node0_4.s({
  294. 'pixelPerfect':true
  295. /*@AddPara@*/
  296. });
  297. Lib_矩阵Node0_4.a('node.width', 54*_ratio.ratioX);
  298. Lib_矩阵Node0_4.a('node.height', 19*_ratio.ratioY);
  299. Lib_矩阵Node0_4.a('node.type', Lib_矩阵Node0_4type);
  300. Lib_矩阵Node0_4.a('node.rect', [0, 0, 54*_ratio.ratioX, 19*_ratio.ratioY]);
  301. Lib_矩阵Node0_4.a('node.background', 'rgba(255,114,14,1)');
  302. Lib_矩阵Node0_4.a('node.gradientcolor', 'rgba(255,114,14,1)');
  303. Lib_矩阵Node0_4.a('node.gradient', '');
  304. Lib_矩阵Node0_4.a('node.borderwidth', Lib_矩阵Node0_4BorderWidth);
  305. Lib_矩阵Node0_4.a('node.color', 'rgba(255,114,14,1)');
  306. Lib_矩阵Node0_4.a('node.fillrect', [0,0,0,0]);
  307. Lib_矩阵Node0_4.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  308. Lib_矩阵Node0_4.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  309. Lib_矩阵Node0_4.a('node.fillgradient', '');
  310. if (Lib_矩阵Node0_4type !== 'rect') {
  311. Lib_矩阵Node0_4.a('node.arcFrom', parseFloat('@arcFrom@'));
  312. Lib_矩阵Node0_4.a('node.arcTo', parseFloat('@arcTo@'));
  313. Lib_矩阵Node0_4.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  314. }
  315. if (Lib_矩阵Node0_4type === 'arc') {
  316. Lib_矩阵Node0_4.a('node.arcOval', true);
  317. }
  318. Lib_矩阵Node0_4.setRotation(0*Math.PI/180);
  319. Lib_矩阵Node0_4.borderWidth = Lib_矩阵Node0_4BorderWidth;
  320. Lib_矩阵Node0_4.borderFillwidth = Lib_矩阵Node0_4BorderWidth;
  321. dataModel.add(Lib_矩阵Node0_4);
  322. Lib_矩阵Node0_4._nodename = 'Lib_矩阵Node0_4'
  323. Lib_矩阵Node0_4._nodeType = 'rect';
  324. zoomNodeList.push({
  325. node: Lib_矩阵Node0_4,
  326. attr: 'node.borderwidth'
  327. });
  328. (function (node, _img) {
  329. var setWidth = node.setWidth,
  330. setHeight = node.setHeight;
  331. node.setWidth = function (width) {
  332. if (width === this.getWidth()) return ;
  333. var height = this.getHeight();
  334. this.a('node.width', width);
  335. this.a('node.rect', [0,0,width, height]);
  336. setWidth.apply(this, arguments);
  337. }
  338. node.setHeight = function (height) {
  339. if (height === this.getHeight()) return ;
  340. var width = this.getWidth();
  341. this.a('node.height', height);
  342. this.a('node.rect', [0,0,width, height]);
  343. setHeight.apply(this, arguments);
  344. }
  345. })(Lib_矩阵Node0_4, Lib_矩阵Node0_4.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  346. var Lib_矩阵Node0_5type = 'rect';
  347. var Lib_矩阵Node0_5 = new ht.Node(),
  348. Lib_矩阵Node0_5BorderWidth = 1*2;
  349. if (Lib_矩阵Node0_5type === 'arc') {
  350. Lib_矩阵Node0_5BorderWidth *= 1;
  351. }
  352. Lib_矩阵Node0_5.setImage(GD.getRectJSON(54*_ratio.ratioX, 19*_ratio.ratioY, Lib_矩阵Node0_5type, '@arcFrom@', '@arcTo@', '@arcClose@'));
  353. Lib_矩阵Node0_5.setPosition(27*ratio.ratioX, 9*ratio.ratioY);
  354. Lib_矩阵Node0_5.setSize(54*_ratio.ratioX, 19*_ratio.ratioY);
  355. Lib_矩阵Node0_5.s({
  356. 'pixelPerfect':true
  357. /*@AddPara@*/
  358. });
  359. Lib_矩阵Node0_5.a('node.width', 54*_ratio.ratioX);
  360. Lib_矩阵Node0_5.a('node.height', 19*_ratio.ratioY);
  361. Lib_矩阵Node0_5.a('node.type', Lib_矩阵Node0_5type);
  362. Lib_矩阵Node0_5.a('node.rect', [0, 0, 54*_ratio.ratioX, 19*_ratio.ratioY]);
  363. Lib_矩阵Node0_5.a('node.background', 'rgba(0,164,218,1)');
  364. Lib_矩阵Node0_5.a('node.gradientcolor', 'rgba(0,164,218,1)');
  365. Lib_矩阵Node0_5.a('node.gradient', '');
  366. Lib_矩阵Node0_5.a('node.borderwidth', Lib_矩阵Node0_5BorderWidth);
  367. Lib_矩阵Node0_5.a('node.color', 'rgba(0,164,218,1)');
  368. Lib_矩阵Node0_5.a('node.fillrect', [0,0,0,0]);
  369. Lib_矩阵Node0_5.a('node.fillbackcolor', 'rgba(0,0,0,0)');
  370. Lib_矩阵Node0_5.a('node.fillgradientcolor', 'rgba(0,0,0,0)');
  371. Lib_矩阵Node0_5.a('node.fillgradient', '');
  372. if (Lib_矩阵Node0_5type !== 'rect') {
  373. Lib_矩阵Node0_5.a('node.arcFrom', parseFloat('@arcFrom@'));
  374. Lib_矩阵Node0_5.a('node.arcTo', parseFloat('@arcTo@'));
  375. Lib_矩阵Node0_5.a('node.arcClose', '@arcClose@' === 'true' ? true : false);
  376. }
  377. if (Lib_矩阵Node0_5type === 'arc') {
  378. Lib_矩阵Node0_5.a('node.arcOval', true);
  379. }
  380. Lib_矩阵Node0_5.setRotation(0*Math.PI/180);
  381. Lib_矩阵Node0_5.borderWidth = Lib_矩阵Node0_5BorderWidth;
  382. Lib_矩阵Node0_5.borderFillwidth = Lib_矩阵Node0_5BorderWidth;
  383. dataModel.add(Lib_矩阵Node0_5);
  384. Lib_矩阵Node0_5._nodename = 'Lib_矩阵Node0_5'
  385. Lib_矩阵Node0_5._nodeType = 'rect';
  386. zoomNodeList.push({
  387. node: Lib_矩阵Node0_5,
  388. attr: 'node.borderwidth'
  389. });
  390. (function (node, _img) {
  391. var setWidth = node.setWidth,
  392. setHeight = node.setHeight;
  393. node.setWidth = function (width) {
  394. if (width === this.getWidth()) return ;
  395. var height = this.getHeight();
  396. this.a('node.width', width);
  397. this.a('node.rect', [0,0,width, height]);
  398. setWidth.apply(this, arguments);
  399. }
  400. node.setHeight = function (height) {
  401. if (height === this.getHeight()) return ;
  402. var width = this.getWidth();
  403. this.a('node.height', height);
  404. this.a('node.rect', [0,0,width, height]);
  405. setHeight.apply(this, arguments);
  406. }
  407. })(Lib_矩阵Node0_5, Lib_矩阵Node0_5.getImage());_ratio = GD.getRatioWithRotation(0*Math.PI/180, ratio);
  408. var Lib_矩阵Node0_6 = new ht.Node();
  409. var Lib_矩阵Node0_6textStart, Lib_矩阵Node0_6textWidth, Lib_矩阵Node0_6lineStart, Lib_矩阵Node0_6align = 'center', Lib_矩阵Node0_6fontSize = 9.33331*_ratio.ratioY,Lib_矩阵Node0_6width = 39*_ratio.ratioX, Lib_矩阵Node0_6height = 16*_ratio.ratioY;
  410. (function () {
  411. if (Lib_矩阵Node0_6align === 'left') {
  412. Lib_矩阵Node0_6textStart = Lib_矩阵Node0_6fontSize * 0.2 > 2 ? Lib_矩阵Node0_6fontSize * 0.2 - 4 : Lib_矩阵Node0_6fontSize * 0.2 - 9;
  413. Lib_矩阵Node0_6textWidth = Lib_矩阵Node0_6width;
  414. Lib_矩阵Node0_6lineStart = 1;
  415. } else if (Lib_矩阵Node0_6align === 'right') {
  416. Lib_矩阵Node0_6textStart = 0;
  417. Lib_矩阵Node0_6textWidth =Lib_矩阵Node0_6fontSize <= 8 ? Lib_矩阵Node0_6width + Lib_矩阵Node0_6fontSize * 0.2 + 6 : Lib_矩阵Node0_6width - Lib_矩阵Node0_6fontSize * 0.2;
  418. Lib_矩阵Node0_6lineStart = (Lib_矩阵Node0_6width - (ht.Default.getTextSize('TEXT', ' '+ Lib_矩阵Node0_6fontSize + 'px "Arial"').width + 6)) * 0.5;
  419. } else if (Lib_矩阵Node0_6align === 'center') {
  420. Lib_矩阵Node0_6textStart = -3;
  421. Lib_矩阵Node0_6textWidth = Lib_矩阵Node0_6width;
  422. Lib_矩阵Node0_6lineStart = Lib_矩阵Node0_6width - ht.Default.getTextSize('TEXT', ' '+ Lib_矩阵Node0_6fontSize + 'px "Arial"').width - 11;
  423. }
  424. })();
  425. Lib_矩阵Node0_6.setImage(GD.getTextJSON(Lib_矩阵Node0_6width, Lib_矩阵Node0_6height, true, false, false, ' '+ Lib_矩阵Node0_6fontSize + 'px "Arial"'))
  426. Lib_矩阵Node0_6.setPosition(27*ratio.ratioX, 10*ratio.ratioY);
  427. Lib_矩阵Node0_6.setWidth(Lib_矩阵Node0_6width);
  428. Lib_矩阵Node0_6.setHeight(Lib_矩阵Node0_6height);
  429. Lib_矩阵Node0_6._nodeType = 'text';
  430. Lib_矩阵Node0_6._disallowEvert = true;
  431. Lib_矩阵Node0_6.setRotation(0*Math.PI/180);
  432. Lib_矩阵Node0_6.a('node.width', Lib_矩阵Node0_6width);
  433. Lib_矩阵Node0_6.a('node.height', Lib_矩阵Node0_6height);
  434. Lib_矩阵Node0_6.a('node.rect', [0, 0, Lib_矩阵Node0_6width, Lib_矩阵Node0_6height]);
  435. Lib_矩阵Node0_6.a('node.bordercolor','rgba(0,0,0,1)');
  436. Lib_矩阵Node0_6.a('node.borderwidth', 0);
  437. Lib_矩阵Node0_6.a('node.background','' || 'rgba(0,0,0,0)');
  438. Lib_矩阵Node0_6.a('node.gradient','');
  439. Lib_矩阵Node0_6.a('node.gradientcolor','');
  440. Lib_矩阵Node0_6.a('node.text','TEXT');
  441. Lib_矩阵Node0_6.a('node.textalign','center');
  442. Lib_矩阵Node0_6.a('node.textvAlign','middle');
  443. Lib_矩阵Node0_6.a('node.textrect', [Lib_矩阵Node0_6textStart, 0, Lib_矩阵Node0_6textWidth, Lib_矩阵Node0_6height]);
  444. Lib_矩阵Node0_6.a('node.color','rgba(0,0,0,1)');
  445. Lib_矩阵Node0_6.a('node.font',' '+ Lib_矩阵Node0_6fontSize + 'px "Arial"');
  446. Lib_矩阵Node0_6.a('node.textvisible',true);
  447. Lib_矩阵Node0_6.a('node.linefeed',false);
  448. if (false) {
  449. Lib_矩阵Node0_6.a('node.textfunc',function(g) {
  450. g.beginPath();
  451. var str=Lib_矩阵Node0_6.a('node.text') || 'TEXT';
  452. var color=Lib_矩阵Node0_6.a('node.color') || 'rgba(0,0,0,1)';
  453. canvasTextAutoLine(str,0,9.33331*0.5*_ratio.ratioY,Lib_矩阵Node0_6width,Lib_矩阵Node0_6height,9.33331*_ratio.ratioY,"center",color,' '+ Lib_矩阵Node0_6fontSize + 'px "Arial"', 0,g);
  454. });
  455. }
  456. if (false) {
  457. Lib_矩阵Node0_6.a('node.underlinepoints',[Lib_矩阵Node0_6lineStart, (16 - 9.33331) * 0.5 * _ratio.ratioY + Lib_矩阵Node0_6fontSize + 2 , ht.Default.getTextSize('TEXT', ' '+ Lib_矩阵Node0_6fontSize + 'px "Arial"').width + 6, (Lib_矩阵Node0_6height - Lib_矩阵Node0_6fontSize) * 0.5*_ratio.ratioY + Lib_矩阵Node0_6fontSize + 2 ]);
  458. Lib_矩阵Node0_6.a('node.underlinevisible',false);
  459. Lib_矩阵Node0_6.a('node.underlineBorderWidth', 1);
  460. }
  461. dataModel.add(Lib_矩阵Node0_6);
  462. zoomNodeList.push({
  463. node: Lib_矩阵Node0_6,
  464. borderWidth: 0,
  465. attr: 'node.borderwidth'
  466. });
  467. /*@GraphList@*/
  468. /*@PageInit@*/
  469. var localVarObj = this.localVarObj;
  470. var localDynamicVarObj = this.localDynamicVar();
  471. var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
  472. var fjzt= localVarObj.fjzt || localDynamicVarObj.fjzt;
  473. var A= localVarObj.A || localDynamicVarObj.A;
  474. var B= localVarObj.B || localDynamicVarObj.B;
  475. var C= localVarObj.C || localDynamicVarObj.C;
  476. var E= localVarObj.E || localDynamicVarObj.E;
  477. var F= localVarObj.F || localDynamicVarObj.F;
  478. var G= localVarObj.G || localDynamicVarObj.G;
  479. var H= localVarObj.H || localDynamicVarObj.H;
  480. var I= localVarObj.I || localDynamicVarObj.I;
  481. this['Lib_矩阵Node0_0'] = Lib_矩阵Node0_0;
  482. Lib_矩阵Node0_0.__parentLib = nodename;
  483. Lib_矩阵Node0_0.__parent = this;
  484. this.childNodes.push(Lib_矩阵Node0_0);
  485. this['Lib_矩阵Node0_1'] = Lib_矩阵Node0_1;
  486. Lib_矩阵Node0_1.__parentLib = nodename;
  487. Lib_矩阵Node0_1.__parent = this;
  488. this.childNodes.push(Lib_矩阵Node0_1);
  489. this['Lib_矩阵Node0_2'] = Lib_矩阵Node0_2;
  490. Lib_矩阵Node0_2.__parentLib = nodename;
  491. Lib_矩阵Node0_2.__parent = this;
  492. this.childNodes.push(Lib_矩阵Node0_2);
  493. this['Lib_矩阵Node0_3'] = Lib_矩阵Node0_3;
  494. Lib_矩阵Node0_3.__parentLib = nodename;
  495. Lib_矩阵Node0_3.__parent = this;
  496. this.childNodes.push(Lib_矩阵Node0_3);
  497. this['Lib_矩阵Node0_4'] = Lib_矩阵Node0_4;
  498. Lib_矩阵Node0_4.__parentLib = nodename;
  499. Lib_矩阵Node0_4.__parent = this;
  500. this.childNodes.push(Lib_矩阵Node0_4);
  501. this['Lib_矩阵Node0_5'] = Lib_矩阵Node0_5;
  502. Lib_矩阵Node0_5.__parentLib = nodename;
  503. Lib_矩阵Node0_5.__parent = this;
  504. this.childNodes.push(Lib_矩阵Node0_5);
  505. this['Lib_矩阵Node0_6'] = Lib_矩阵Node0_6;
  506. Lib_矩阵Node0_6.__parentLib = nodename;
  507. Lib_矩阵Node0_6.__parent = this;
  508. this.childNodes.push(Lib_矩阵Node0_6);
  509. /*@ControlContextMenu@*/
  510. /*@Declare@*/
  511. this.init(x, y, width, height, angle);
  512. };
  513. ht.Default.def('ht.lib.矩阵', Object, {
  514. refresh10ms: function () {
  515. var localVarObj = this.localVarObj;
  516. var localDynamicVarObj = this.localDynamicVar();
  517. var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
  518. var fjzt= localVarObj.fjzt || localDynamicVarObj.fjzt;
  519. var A= localVarObj.A || localDynamicVarObj.A;
  520. var B= localVarObj.B || localDynamicVarObj.B;
  521. var C= localVarObj.C || localDynamicVarObj.C;
  522. var E= localVarObj.E || localDynamicVarObj.E;
  523. var F= localVarObj.F || localDynamicVarObj.F;
  524. var G= localVarObj.G || localDynamicVarObj.G;
  525. var H= localVarObj.H || localDynamicVarObj.H;
  526. var I= localVarObj.I || localDynamicVarObj.I;
  527. var Lib_矩阵Node0_0= this.Lib_矩阵Node0_0;
  528. var Lib_矩阵Node0_1= this.Lib_矩阵Node0_1;
  529. var Lib_矩阵Node0_2= this.Lib_矩阵Node0_2;
  530. var Lib_矩阵Node0_3= this.Lib_矩阵Node0_3;
  531. var Lib_矩阵Node0_4= this.Lib_矩阵Node0_4;
  532. var Lib_矩阵Node0_5= this.Lib_矩阵Node0_5;
  533. var Lib_矩阵Node0_6= this.Lib_矩阵Node0_6;
  534. /*@refresh10ms@*/
  535. },
  536. refresh100ms: function () {
  537. var localVarObj = this.localVarObj;
  538. var localDynamicVarObj = this.localDynamicVar();
  539. var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
  540. var fjzt= localVarObj.fjzt || localDynamicVarObj.fjzt;
  541. var A= localVarObj.A || localDynamicVarObj.A;
  542. var B= localVarObj.B || localDynamicVarObj.B;
  543. var C= localVarObj.C || localDynamicVarObj.C;
  544. var E= localVarObj.E || localDynamicVarObj.E;
  545. var F= localVarObj.F || localDynamicVarObj.F;
  546. var G= localVarObj.G || localDynamicVarObj.G;
  547. var H= localVarObj.H || localDynamicVarObj.H;
  548. var I= localVarObj.I || localDynamicVarObj.I;
  549. var Lib_矩阵Node0_0= this.Lib_矩阵Node0_0;
  550. var Lib_矩阵Node0_1= this.Lib_矩阵Node0_1;
  551. var Lib_矩阵Node0_2= this.Lib_矩阵Node0_2;
  552. var Lib_矩阵Node0_3= this.Lib_矩阵Node0_3;
  553. var Lib_矩阵Node0_4= this.Lib_矩阵Node0_4;
  554. var Lib_矩阵Node0_5= this.Lib_矩阵Node0_5;
  555. var Lib_矩阵Node0_6= this.Lib_矩阵Node0_6;
  556. Lib_矩阵Node0_6.a('node.text',''+bianhao+'');
  557. /*@refresh100ms@*/
  558. },
  559. refresh500ms: function () {
  560. var localVarObj = this.localVarObj;
  561. var localDynamicVarObj = this.localDynamicVar();
  562. var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
  563. var fjzt= localVarObj.fjzt || localDynamicVarObj.fjzt;
  564. var A= localVarObj.A || localDynamicVarObj.A;
  565. var B= localVarObj.B || localDynamicVarObj.B;
  566. var C= localVarObj.C || localDynamicVarObj.C;
  567. var E= localVarObj.E || localDynamicVarObj.E;
  568. var F= localVarObj.F || localDynamicVarObj.F;
  569. var G= localVarObj.G || localDynamicVarObj.G;
  570. var H= localVarObj.H || localDynamicVarObj.H;
  571. var I= localVarObj.I || localDynamicVarObj.I;
  572. var Lib_矩阵Node0_0= this.Lib_矩阵Node0_0;
  573. var Lib_矩阵Node0_1= this.Lib_矩阵Node0_1;
  574. var Lib_矩阵Node0_2= this.Lib_矩阵Node0_2;
  575. var Lib_矩阵Node0_3= this.Lib_矩阵Node0_3;
  576. var Lib_矩阵Node0_4= this.Lib_矩阵Node0_4;
  577. var Lib_矩阵Node0_5= this.Lib_矩阵Node0_5;
  578. var Lib_矩阵Node0_6= this.Lib_矩阵Node0_6;
  579. if((1 )>0) {if(((getVarValue(fjzt)==0)>0 )){Lib_矩阵Node0_0.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_矩阵Node0_0.s('2d.visible',false&&this.getStyle('2d.visible'));}}
  580. if((1 )>0) {if(((getVarValue(fjzt)==3)>0 )){Lib_矩阵Node0_1.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_矩阵Node0_1.s('2d.visible',false&&this.getStyle('2d.visible'));}}
  581. if((1 )>0) {if(((getVarValue(fjzt)==5||getVarValue(fjzt)==6)>0 )){Lib_矩阵Node0_2.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_矩阵Node0_2.s('2d.visible',false&&this.getStyle('2d.visible'));}}
  582. if((1 )>0) {if(((getVarValue(fjzt)==2)>0 )){Lib_矩阵Node0_3.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_矩阵Node0_3.s('2d.visible',false&&this.getStyle('2d.visible'));}}
  583. if((1 )>0) {if(((getVarValue(fjzt)==4)>0 )){Lib_矩阵Node0_4.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_矩阵Node0_4.s('2d.visible',false&&this.getStyle('2d.visible'));}}
  584. if((1 )>0) {if(((getVarValue(fjzt)==1)>0 )){Lib_矩阵Node0_5.s('2d.visible',true&&this.getStyle('2d.visible'));}else{Lib_矩阵Node0_5.s('2d.visible',false&&this.getStyle('2d.visible'));}}
  585. /*@refresh500ms@*/
  586. },
  587. refresh1s: function () {
  588. var Counter1s = arguments[0] || 0;
  589. var localVarObj = this.localVarObj;
  590. var localDynamicVarObj = this.localDynamicVar();
  591. var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
  592. var fjzt= localVarObj.fjzt || localDynamicVarObj.fjzt;
  593. var A= localVarObj.A || localDynamicVarObj.A;
  594. var B= localVarObj.B || localDynamicVarObj.B;
  595. var C= localVarObj.C || localDynamicVarObj.C;
  596. var E= localVarObj.E || localDynamicVarObj.E;
  597. var F= localVarObj.F || localDynamicVarObj.F;
  598. var G= localVarObj.G || localDynamicVarObj.G;
  599. var H= localVarObj.H || localDynamicVarObj.H;
  600. var I= localVarObj.I || localDynamicVarObj.I;
  601. var Lib_矩阵Node0_0= this.Lib_矩阵Node0_0;
  602. var Lib_矩阵Node0_1= this.Lib_矩阵Node0_1;
  603. var Lib_矩阵Node0_2= this.Lib_矩阵Node0_2;
  604. var Lib_矩阵Node0_3= this.Lib_矩阵Node0_3;
  605. var Lib_矩阵Node0_4= this.Lib_矩阵Node0_4;
  606. var Lib_矩阵Node0_5= this.Lib_矩阵Node0_5;
  607. var Lib_矩阵Node0_6= this.Lib_矩阵Node0_6;
  608. /*@refresh1s@*/
  609. },
  610. refresh5s: function () {
  611. var localVarObj = this.localVarObj;
  612. var localDynamicVarObj = this.localDynamicVar();
  613. var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
  614. var fjzt= localVarObj.fjzt || localDynamicVarObj.fjzt;
  615. var A= localVarObj.A || localDynamicVarObj.A;
  616. var B= localVarObj.B || localDynamicVarObj.B;
  617. var C= localVarObj.C || localDynamicVarObj.C;
  618. var E= localVarObj.E || localDynamicVarObj.E;
  619. var F= localVarObj.F || localDynamicVarObj.F;
  620. var G= localVarObj.G || localDynamicVarObj.G;
  621. var H= localVarObj.H || localDynamicVarObj.H;
  622. var I= localVarObj.I || localDynamicVarObj.I;
  623. var Lib_矩阵Node0_0= this.Lib_矩阵Node0_0;
  624. var Lib_矩阵Node0_1= this.Lib_矩阵Node0_1;
  625. var Lib_矩阵Node0_2= this.Lib_矩阵Node0_2;
  626. var Lib_矩阵Node0_3= this.Lib_矩阵Node0_3;
  627. var Lib_矩阵Node0_4= this.Lib_矩阵Node0_4;
  628. var Lib_矩阵Node0_5= this.Lib_矩阵Node0_5;
  629. var Lib_矩阵Node0_6= this.Lib_矩阵Node0_6;
  630. /*@refresh5s@*/
  631. },
  632. /*@PageDynamic@*/
  633. onEvent: function (e, data, type, origin, offset, objMouseOn, ctm) {
  634. var localVarObj = this.localVarObj;
  635. var localDynamicVarObj = this.localDynamicVar();
  636. var bianhao= localVarObj.bianhao || localDynamicVarObj.bianhao;
  637. var fjzt= localVarObj.fjzt || localDynamicVarObj.fjzt;
  638. var A= localVarObj.A || localDynamicVarObj.A;
  639. var B= localVarObj.B || localDynamicVarObj.B;
  640. var C= localVarObj.C || localDynamicVarObj.C;
  641. var E= localVarObj.E || localDynamicVarObj.E;
  642. var F= localVarObj.F || localDynamicVarObj.F;
  643. var G= localVarObj.G || localDynamicVarObj.G;
  644. var H= localVarObj.H || localDynamicVarObj.H;
  645. var I= localVarObj.I || localDynamicVarObj.I;
  646. var Lib_矩阵Node0_0= this.Lib_矩阵Node0_0;
  647. var Lib_矩阵Node0_1= this.Lib_矩阵Node0_1;
  648. var Lib_矩阵Node0_2= this.Lib_矩阵Node0_2;
  649. var Lib_矩阵Node0_3= this.Lib_矩阵Node0_3;
  650. var Lib_矩阵Node0_4= this.Lib_矩阵Node0_4;
  651. var Lib_矩阵Node0_5= this.Lib_矩阵Node0_5;
  652. var Lib_矩阵Node0_6= this.Lib_矩阵Node0_6;
  653. if (type === 'click') {
  654. /*@EvnentClicked@*/
  655. } else if (type === 'mousedown') {
  656. mouseX=e.clientX;
  657. mouseY=e.clientY;
  658. if(data === Lib_矩阵Node0_0){if( ( I>=34&&I<=83 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_hy34'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  659. if(data === Lib_矩阵Node0_1){if( ( I>=34&&I<=83 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_hy34'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  660. if(data === Lib_矩阵Node0_2){if( ( I>=34&&I<=83 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_hy34'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  661. if(data === Lib_矩阵Node0_3){if( ( I>=34&&I<=83 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_hy34'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  662. if(data === Lib_矩阵Node0_4){if( ( I>=34&&I<=83 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_hy34'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  663. if(data === Lib_矩阵Node0_5){if( ( I>=34&&I<=83 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_hy34'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  664. if(data === Lib_矩阵Node0_6){if( ( ( E>=1&&E<=33 ) || ( E>=45&&E<=46 ) || ( E>=57&&E<=64 ) || ( E==66 ) || ( E>=78&&E<=99 ) ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_wn1'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  665. if(data === Lib_矩阵Node0_6){if( ( ( E>=34&&E<=44 ) || ( E>=47&&E<=56 ) || ( E==65 ) ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_wn34'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  666. if(data === Lib_矩阵Node0_6){if( ( E>=67&&E<=77 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_wn34'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  667. if(data === Lib_矩阵Node0_6){if( ( ( F>=1&&F<=16 ) || ( F>=100&&F<=115 ) ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_yy1'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  668. if(data === Lib_矩阵Node0_6){if( ( ( F>=17&&F<=66 ) || ( F>=116&&F<=132 ) ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_yy17'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  669. if(data === Lib_矩阵Node0_6){if( ( F>=67&&F<=99 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_yy67'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  670. if(data === Lib_矩阵Node0_6){if( ( ( G>=1&&G<=66 ) || ( G>=74&&G<=84 ) || ( G>=90&&G<=93 ) ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_pl1'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  671. if(data === Lib_矩阵Node0_6){if( ( ( G>=67&&G<=73 ) || ( G>=85&&G<=89 ) || ( G>=94&&G<=101 ) ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_pl67'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  672. if(data === Lib_矩阵Node0_6){if( ( H>=1 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_gl'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  673. if(data === Lib_矩阵Node0_6){if( ( I>=1&&I<=33 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_hy1'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  674. if(data === Lib_矩阵Node0_6){if( ( I>=34&&I<=83 ) >0 ){if(isAuthEnable=='False'||isAuthEnable=='True'&&-1==-1){(typeof window.saveLocalParams === 'function') && (function (){var params = { }; GD.getFullParams(params, data); saveLocalParams(params)})();var hash = window.location.hash; window.location.hash = '1234/djz_hy34'; if (hash === window.location.hash && typeof window.onhashchange === 'function') {window.onhashchange();}}}else{} }
  675. /*@EvnentMouseDown@*/
  676. } else if (type === 'mouseup') {
  677. /*@EvnentMouseUp@*/
  678. } else if (type === 'mousemove') {
  679. var mouseX, mouseY, position, zoom;
  680. position=origin.getLogicalPoint(e);
  681. zoom = graphView.getZoom();
  682. if (origin === graphView) {
  683. mouseX= position.x + origin.tx();
  684. mouseY = position.y + origin.ty();
  685. } else {
  686. offset = offset || {x: 0, y: 0};
  687. mouseX = position.x / zoom + offset.x + origin.tx();
  688. mouseY = position.y / zoom + offset.y + origin.ty();
  689. }
  690. /*@EvnentMouseLeave@*/
  691. /*@EvnentMouseOver@*/
  692. } else if (type === 'keydown') {
  693. /*@EvnentKeyDown@*/
  694. } else if (type === 'contextmenu') {
  695. /*@Declare@*/
  696. /*@SetNodeContextMenu@*/
  697. /*@SetPageContextMenu@*/
  698. }
  699. /*@LibEvent@*/
  700. },
  701. getBaseClass: function () {
  702. return this._baseClass;
  703. },
  704. getWidth: function () {
  705. return this._width;
  706. },
  707. getHeight: function () {
  708. return this._height;
  709. },
  710. getSize: function () {
  711. return {
  712. width: this._width,
  713. height: this._height
  714. }
  715. },
  716. setWidth: function (width) {
  717. if (width === undefined || width === null || width != width) {
  718. return ;
  719. }
  720. var originWidth = this._width;
  721. var ratio = width / originWidth;
  722. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), w, cw, ox, rotation = this.getRotation();
  723. for (var i = 0, len = childNodes.length; i < len; i++) {
  724. childNode = childNodes[i];
  725. p = childNode.getPosition();
  726. cw = childNode.getWidth();
  727. w = cw >=2 ? cw * ratio : cw;
  728. childNode.setWidth(w);
  729. ox = op.x + (p.x - op.x) * ratio;
  730. childNode.setPosition(ox, p.y);
  731. rotation = GD.calcRotation(rotation);
  732. if (rotation === 0 || rotation === Math.PI) {
  733. // 图元未旋转
  734. ox = op.x + (p.x - op.x)*ratio;
  735. childNode.setPosition(ox, p.y);
  736. } else if (rotation === 90 * Math.PI / 180) {
  737. // 图元旋转以后
  738. ox = op.y + (p.y - op.y)*ratio;
  739. childNode.setPosition(p.x, ox);
  740. }
  741. }
  742. this._width = width;
  743. this._originWidth = width;
  744. this._ratioX = ratio;
  745. return this;
  746. },
  747. setHeight: function (height) {
  748. if (height === undefined || height === null || height != height) {
  749. return ;
  750. }
  751. var originHeight = this._height;
  752. var ratio = height / originHeight;
  753. var childNodes = this.childNodes, childNode, p, op = this.getPosition(), h, ch, oy, rotation = this.getRotation();
  754. for (var i = 0, len = childNodes.length; i < len; i++) {
  755. childNode = childNodes[i];
  756. p = childNode.getPosition();
  757. ch = childNode.getHeight();
  758. h = ch >=2 ? ch * ratio : ch;
  759. childNode.setHeight(h);
  760. rotation = GD.calcRotation(rotation);
  761. if (rotation === 0 || rotation === Math.PI) {
  762. // 图元未旋转
  763. oy = op.y + (p.y - op.y)*ratio;
  764. childNode.setPosition(p.x, oy);
  765. } else if (rotation === 90 * Math.PI / 180) {
  766. // 图元旋转以后
  767. oy = op.x + (p.x - op.x)*ratio;
  768. childNode.setPosition(oy, p.y);
  769. }
  770. }
  771. this._height = height;
  772. this._originHeight = height;
  773. this._ratioY = ratio;
  774. return this;
  775. },
  776. setSize: function (size) {
  777. // var args = Array.prototype.slice.call(arguments, 0);
  778. // var height, width;
  779. // if (args.length === 0) {
  780. // return ;
  781. // }else if (args.length === 1) {
  782. // height = args[0].height;
  783. // width = args[0].width;
  784. // } else {
  785. // width = args[0];
  786. // height = args[1];
  787. // }
  788. // var wh = GD.getRatioWithRotation(angle, wid)
  789. // this.setHeight(height);
  790. // this.setWidth(width);
  791. // return this;
  792. var args = Array.prototype.slice.call(arguments, 0);
  793. var height, width;
  794. if (args.length === 0) {
  795. return ;
  796. }else if (args.length === 1) {
  797. height = args[0].height;
  798. width = args[0].width;
  799. angle = 0;
  800. } else if (args.length === 2) {
  801. if (typeof args[0] === 'object') {
  802. width = args[0].width;
  803. height = args[0].height;
  804. angle = args[1] || 0;
  805. } else {
  806. width = args[0];
  807. height = args[1];
  808. angle = 0;
  809. }
  810. } else if (args.length === 3) {
  811. width = args[0];
  812. height = args[1];
  813. angle = args[2] || 0;
  814. }
  815. var wh = GD.getRatioWithRotation(0, width, height);
  816. this.setHeight(wh.ratioY);
  817. this.setWidth(wh.ratioX);
  818. return this;
  819. },
  820. getPosition: function () {
  821. return {
  822. x: this._x,
  823. y: this._y
  824. }
  825. },
  826. setPosition: function () {
  827. var args = Array.prototype.slice.call(arguments, 0), x, y;
  828. if (args.length === 0) {
  829. return this;
  830. } else if (args.length === 1) {
  831. if (typeof args[0] != 'object') {
  832. return this;
  833. }
  834. x = args[0].x;
  835. y = args[0].y;
  836. } else {
  837. x = args[0];
  838. y = args[1];
  839. }
  840. if ((x !== 0 && !x) || (y !== 0 && !y)) {
  841. return this;
  842. }
  843. // var childNodes = this.childNodes, offset, childNode, p;
  844. // for (var i = 0, len = childNodes.length; i < len; i++) {
  845. // childNode = childNodes[i];
  846. // p = childNode.getPosition();
  847. // childNode.setPosition(x - (this._x-p.x)*this._ratioX, y - (this._y-p.y)*this._ratioY);
  848. // }
  849. // this._x = x;
  850. // this._y = y;
  851. // return this;
  852. var childNodes, childNode, background, offset = {}, op, cp;
  853. childNodes = this.childNodes;
  854. background = this._background;
  855. op = background.getPosition();
  856. offset.x = x - op.x;
  857. offset.y = y - op.y;
  858. for (var i = 0, len = childNodes.length; i < len; i++) {
  859. childNode = childNodes[i];
  860. cp = childNode.getPosition();
  861. childNode.setPosition(cp.x + offset.x, cp.y + offset.y);
  862. }
  863. this._x = x;
  864. this._y = y;
  865. this._position = {x: x, y: y};
  866. return this;
  867. },
  868. getStyle: function (key) {
  869. if (!key) {
  870. return undefined;
  871. }
  872. return this._styleObject[key];
  873. },
  874. setStyle: function (key, value, force) {
  875. var childNodes = this.childNodes, childNode;
  876. for (var i = 0, len = childNodes.length; i < len; i++) {
  877. childNode = childNodes[i];
  878. if (key === '2d.visible') {
  879. if (value === graphView.isVisible(childNode)) {
  880. continue;
  881. }
  882. if (!value) {
  883. childNode._savedIsVisible = graphView.isVisible(childNode);
  884. childNode.s({
  885. '2d.visible': false
  886. })
  887. } else {
  888. childNode.s({
  889. '2d.visible': childNode._savedIsVisible
  890. })
  891. }
  892. continue;
  893. }
  894. childNode.s({
  895. key: value
  896. });
  897. }
  898. this._styleObject[key] = value;
  899. return this;
  900. },
  901. calcSize: function () {
  902. var background = this._background;
  903. var position = background.getPosition(),
  904. width = background.getWidth(),
  905. height = background.getHeight();
  906. this._width = width;
  907. this._height = height;
  908. this._x = position.x;
  909. this._y = position.y;
  910. this._position = {
  911. x: this._x,
  912. y: this._y
  913. }
  914. return this;
  915. return this;
  916. },
  917. s: function (styleObj, force) {
  918. var args = Array.prototype.slice.call(arguments, 0);
  919. var styleObj;
  920. if (args.length === 0) {
  921. return this;
  922. } else if (args.length === 1) {
  923. styleObj = args[0];
  924. } else {
  925. this.setStyle(args[0], args[1]);
  926. return this;
  927. }
  928. for (var key in styleObj) {
  929. if (!styleObj.hasOwnProperty(key)) {
  930. continue;
  931. }
  932. this.setStyle(key, styleObj[key], force);
  933. }
  934. return this;
  935. },
  936. init: function (x, y, width, height, angle) {
  937. var that = this;
  938. this.calcSize();
  939. (function (width, height, angle) {
  940. // that.setSize(width, height, angle);
  941. // var wh = GD.getRatioWithRotation(angle, width, height);
  942. // width = wh.ratioX;
  943. // height = wh.ratioY;
  944. var originHeight = that._height;
  945. var originWidth = that._width;
  946. var ratioY = height / originHeight;
  947. var ratioX = width / originWidth;
  948. var childNodes = that.childNodes,
  949. childNode,p, op = that.getPosition(), h, ch, oy, w, cw, ox, name, borderRatio, borderWidth;
  950. for (var i = 0, len = childNodes.length; i < len; i++) {
  951. childNode = childNodes[i];
  952. p = childNode.getPosition();
  953. childNode.originHeight = childNode.originHeight || childNode.getHeight();
  954. ch = childNode.getHeight();
  955. cw = childNode.getWidth();
  956. if (ch > 2) {
  957. h = ch * ratioY;
  958. childNode.setHeight(h);
  959. }
  960. if (cw > 2) {
  961. w = cw * ratioX;
  962. childNode.setWidth(w);
  963. }
  964. borderRatio = (ratioX + ratioY)*0.5;
  965. if (childNode._nodeType === 'line') { // 如果是线,
  966. if (childNode.getWidth() > childNode.getHeight()) {
  967. borderRatio = ratioX;
  968. } else {
  969. borderRatio = ratioY;
  970. }
  971. }
  972. name = childNode._nodename;
  973. // if (childNode.borderWidth && name && ch > 2 && cw > 2) {
  974. // borderWidth = childNode.borderWidth / borderRatio;
  975. // if (borderWidth > ch*0.5 || borderWidth > cw *0.5) {
  976. // // borderWidth = childNode.borderWidth;
  977. // }
  978. // childNode.borderWidth = borderWidth;
  979. // childNode.a(name + '.borderwidth', borderWidth);
  980. // }
  981. }
  982. that._height = height;
  983. that._originHeight = height;
  984. that._ratioY = ratioY;
  985. that._width = width;
  986. that._originWidth = width;
  987. that._ratioX = ratioX;
  988. })(width, height, angle);
  989. that._x = width / 2;
  990. that._y = height / 2;
  991. that._rotation = 0;
  992. // that.setPosition(x, y);
  993. (function (x, y) {
  994. var childNodes = that.childNodes, offset, childNode;
  995. var w2 = that.getWidth() / 2, h2 = that.getHeight()/2;
  996. for (var i = 0, len = childNodes.length; i < len; i++) {
  997. childNode = childNodes[i];
  998. offset = childNode.getPosition();
  999. childNode.setPosition(x + offset.x * that._ratioX - w2, y + offset.y * that._ratioY - h2);
  1000. }
  1001. that._x = x;
  1002. that._y = y;
  1003. })(x, y);
  1004. // setTimeout(that.addEVent, 1000);
  1005. },
  1006. setRotation: function (angle) {
  1007. var that = this, _angle = that.getRotation();
  1008. if (angle!==0 && !angle || angle === _angle) {
  1009. return this;
  1010. }
  1011. var childNodes = this.childNodes, childNode, p = this.getPosition(), px = p.x, py = p.y;
  1012. for (var i = 0, len = childNodes.length; i < len; i++) {
  1013. childNode = childNodes[i];
  1014. var x = childNode.getPosition().x - px;
  1015. var y = childNode.getPosition().y - py;
  1016. childNode.setPosition(Math.cos(angle-_angle) * x - Math.sin(angle-_angle) * y + px, Math.cos(angle-_angle) * y + Math.sin(angle-_angle) * x + py);
  1017. childNode.setRotation(angle);
  1018. }
  1019. this._rotation = angle;
  1020. return this;
  1021. },
  1022. getRotation: function () {
  1023. return this._rotation;
  1024. },
  1025. setScale: function (sx, sy) {
  1026. var that = this,
  1027. childNodes = this.childNodes,
  1028. childNode;
  1029. if (sx === undefined || sx === null) return ;
  1030. if (sy === undefined || sy === null) {
  1031. sy = sx;
  1032. }
  1033. for (var i = 0, len = childNodes.length; i < len; i++) {
  1034. childNode = childNodes[i];
  1035. if (typeof childNode.setScale === 'function') {
  1036. childNode.setScale(sx, sy);
  1037. }
  1038. }
  1039. },
  1040. getScale: function () {
  1041. return this._background.getScale();
  1042. },
  1043. setScaleX: function (sx) {
  1044. if (sx === undefined || sx === null) return;
  1045. var that = this,
  1046. childNodes = this.childNodes,
  1047. childNode;
  1048. for (var i = 0, len = childNodes.length; i < len; i++) {
  1049. childNode = childNodes[i];
  1050. if (typeof childNode.setScaleX === 'function') {
  1051. childNode.setScaleX(sx);
  1052. }
  1053. }
  1054. },
  1055. setScaleY: function (sy) {
  1056. if (sy === undefined || sy === null) return;
  1057. var that = this,
  1058. childNodes = this.childNodes,
  1059. childNode;
  1060. for (var i = 0, len = childNodes.length; i < len; i++) {
  1061. childNode = childNodes[i];
  1062. if (typeof childNode.setScaleY === 'function') {
  1063. childNode.setScaleY(sy);
  1064. }
  1065. }
  1066. },
  1067. getScaleX: function () {
  1068. return this._background.getScaleX();
  1069. },
  1070. getScaleY: function () {
  1071. return this._background.getScaleY();
  1072. },
  1073. evert: function () {
  1074. var that = this,
  1075. childNodes = this.childNodes,
  1076. background = this._background,
  1077. bp = background.getPosition(),
  1078. bx = bp.x,
  1079. by = bp.y,
  1080. childNode, distanceX, distanceY, x, y, p, nx, ny;
  1081. for (var i = 0, len = childNodes.length; i < len; i++) {
  1082. childNode = childNodes[i];
  1083. p = childNode.getPosition();
  1084. x = p.x;
  1085. y = p.y;
  1086. distanceX = bx - x;
  1087. distanceY = by - y;
  1088. nx = bx + distanceX;
  1089. ny = by + distanceY;
  1090. childNode.setPosition(nx, ny);
  1091. if (typeof childNode.setScale === 'function') {
  1092. if (!(childNode._disallowEvert === true))
  1093. childNode.setScale(-1, -1);
  1094. }
  1095. }
  1096. },
  1097. evertX: function () {
  1098. var that = this,
  1099. childNodes = this.childNodes,
  1100. background = this._background,
  1101. bx = background.getPosition().x,
  1102. childNode, distance, x, p, nx;
  1103. for (var i = 0, len = childNodes.length; i < len; i++) {
  1104. childNode = childNodes[i];
  1105. p = childNode.getPosition();
  1106. x = p.x;
  1107. distance = bx - x;
  1108. nx = bx + distance;
  1109. childNode.setPosition(nx, p.y);
  1110. if (typeof childNode.setScaleX === 'function') {
  1111. if (!(childNode._disallowEvert === true))
  1112. childNode.setScaleX(-1);
  1113. }
  1114. }
  1115. },
  1116. evertY: function () {
  1117. var that = this,
  1118. childNodes = this.childNodes,
  1119. background = this._background,
  1120. by = background.getPosition().y,
  1121. childNode, distance, y, p, ny;
  1122. for (var i = 0, len = childNodes.length; i < len; i++) {
  1123. childNode = childNodes[i];
  1124. p = childNode.getPosition();
  1125. y = p.y;
  1126. distance = by - y;
  1127. ny = by + distance;
  1128. childNode.setPosition(p.x, ny);
  1129. if (typeof childNode.setScaleY === 'function') {
  1130. if (!(childNode._disallowEvert === true))
  1131. childNode.setScaleY(-1);
  1132. }
  1133. }
  1134. },
  1135. attr: function (key, value) {
  1136. var _attrObj = this._attrObj || {};
  1137. if (arguments.length === 1) {
  1138. return _attrObj[key];
  1139. }
  1140. var childNodes = this.childNodes, childNode;
  1141. _attrObj[key] = value;
  1142. for (var i = 0; childNode = childNodes[i++];) {
  1143. if (typeof childNode.a === 'function') {
  1144. childNode.a(key, value);
  1145. }
  1146. }
  1147. },
  1148. a: function () {
  1149. return this.attr.apply(this, arguments);
  1150. }
  1151. });
  1152. }