$Module.js 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716
  1. MWF.xApplication.cms.FormDesigner.Module = MWF.xApplication.cms.FormDesigner.Module || {};
  2. MWF.require("MWF.widget.Common", null, false);
  3. MWF.xDesktop.requireApp("cms.FormDesigner", "Property", null, false);
  4. MWF.xApplication.cms.FormDesigner.Module.$Module = MWF.CMSFC$Module = new Class({
  5. Extends: MWF.widget.Common,
  6. Implements: [Options, Events],
  7. options: {
  8. "style": "default",
  9. "actions": [
  10. {
  11. "name": "move",
  12. "icon": "move1.png",
  13. "event": "mousedown",
  14. "action": "move",
  15. "title": MWF.CMSFD.LP.formAction.move
  16. },
  17. {
  18. "name": "copy",
  19. "icon": "copy1.png",
  20. "event": "mousedown",
  21. "action": "copy",
  22. "title": MWF.CMSFD.LP.formAction.copy
  23. },
  24. {
  25. "name": "delete",
  26. "icon": "delete1.png",
  27. "event": "click",
  28. "action": "delete",
  29. "title": MWF.CMSFD.LP.formAction["delete"]
  30. }
  31. ],
  32. "actionNodeStyles": {
  33. "width": "16px",
  34. "height": "16px",
  35. "margin-left": "2px",
  36. "margin-right": "2px",
  37. "float": "left",
  38. "border": "1px solid #F1F1F1",
  39. "cursor": "pointer"
  40. },
  41. "propertyPath": "/x_component_cms_FormDesigner/Module/Label/label.html"
  42. },
  43. _getNewId: function(prefix, moduleName){
  44. var p = "";
  45. if (prefix){
  46. p = prefix+"_";
  47. }
  48. if (!moduleName) moduleName = this.moduleName;
  49. var idx = 1;
  50. var id = p+moduleName;
  51. while (this.form.json.moduleList[id]){
  52. id = p+moduleName+"_"+idx;
  53. idx++;
  54. }
  55. return id;
  56. },
  57. load : function(json, node, parent){
  58. this.json = json;
  59. this.node= node;
  60. this.node.store("module", this);
  61. this.node.setStyles(this.css.moduleNode);
  62. this._loadNodeStyles();
  63. this._loadTreeNode(parent);
  64. this._initModule();
  65. this.parentContainer = this.treeNode.parentNode.module;
  66. this._setEditStyle_custom("id");
  67. },
  68. _loadNodeStyles: function(){
  69. },
  70. _loadNodeCustomStyles: function(){
  71. this.setCustomStyles();
  72. },
  73. _loadTreeNode: function(parent){
  74. var title = this.json.name || this.json.id;
  75. var text = this.json.type.substr(this.json.type.lastIndexOf("$")+1, this.json.type.length);
  76. var o = {
  77. "expand": true,
  78. "title": this.json.id,
  79. "text": "<"+text+"> "+title,
  80. "icon": ""
  81. };
  82. o.action = function(){
  83. if (this.module) this.module.selected();
  84. };
  85. if (this.nextModule){
  86. this.treeNode = this.nextModule.treeNode.insertChild(o);
  87. }else{
  88. this.treeNode = parent.treeNode.appendChild(o);
  89. }
  90. this.treeNode.module = this;
  91. },
  92. _initModule: function(){
  93. this.setPropertiesOrStyles("styles");
  94. this.setPropertiesOrStyles("properties");
  95. this._setNodeProperty();
  96. this._createIconAction();
  97. this._setNodeEvent();
  98. },
  99. _setNodeProperty: function(){},
  100. _createIconAction: function(){
  101. if (!this.actionArea){
  102. this.actionArea = new Element("div", {
  103. styles: {
  104. "display": "none",
  105. // "width": 18*this.options.actions.length,
  106. "position": "absolute",
  107. "background-color": "#F1F1F1",
  108. "padding": "1px",
  109. "padding-right": "0px",
  110. "border": "1px solid #AAA",
  111. "box-shadow": "0px 2px 5px #999",
  112. "opacity": 1,
  113. "z-index": 100
  114. }
  115. }).inject(this.form.container, "after");
  116. this.options.actions.each(function(action){
  117. var actionNode = new Element("div", {
  118. "styles": this.options.actionNodeStyles,
  119. "title": action.title
  120. }).inject(this.actionArea);
  121. actionNode.setStyle("background", "url("+this.path+this.options.style+"/icon/"+action.icon+") no-repeat left center");
  122. actionNode.addEvent(action.event, function(e){
  123. this[action.action](e);
  124. }.bind(this));
  125. actionNode.addEvents({
  126. "mouseover": function(e){
  127. e.target.setStyle("border", "1px solid #999");
  128. }.bind(this),
  129. "mouseout": function(e){
  130. e.target.setStyle("border", "1px solid #F1F1F1");
  131. }.bind(this)
  132. });
  133. }.bind(this));
  134. this._createCustomIconAction();
  135. }
  136. },
  137. _createCustomIconAction: function(){},
  138. _setActionAreaPosition: function(){
  139. var p = this.node.getPosition(this.form.node.getOffsetParent());
  140. var y = p.y-25;
  141. var x = p.x;
  142. this.actionArea.setPosition({"x": x, "y": y});
  143. },
  144. _moveTo: function(container){
  145. this.parentContainer = container;
  146. if (!this.node){
  147. this._createNode();
  148. }
  149. this._resetTreeNode();
  150. this.node.inject(container.node);
  151. },
  152. move: function(e){
  153. this._createMoveNode();
  154. var thisDisplay = this.node.getStyle("display");
  155. this.node.store("thisDisplay", thisDisplay);
  156. this.node.setStyle("display", "none");
  157. this._setNodeMove(e);
  158. },
  159. copy: function(e){
  160. this.copyTo().move(e);
  161. },
  162. copyTo: function(node){
  163. if (!node) node = this.form;
  164. var newNode = this.node.clone(true, true);
  165. var newModuleJson = Object.clone(this.json);
  166. newNode.inject(node.node);
  167. var className = this.moduleName.capitalize();
  168. var newTool = new MWF["CMSFC"+className](this.form);
  169. newModuleJson.id = newTool._getNewId();
  170. newNode.set("id", newModuleJson.id);
  171. this.form.json.moduleList[newModuleJson.id] = newModuleJson;
  172. newTool.load(newModuleJson, newNode, node);
  173. return newTool;
  174. },
  175. "delete": function(e){
  176. var module = this;
  177. this.form.designer.shortcut = false;
  178. this.form.designer.confirm("warn", module.node, MWF.CMSFD.LP.notice.deleteElementTitle, MWF.CMSFD.LP.notice.deleteElement, 300, 120, function(){
  179. module.destroy();
  180. module.form.selected();
  181. module.form.designer.shortcut = true;
  182. this.close();
  183. }, function(){
  184. module.form.designer.shortcut = true;
  185. this.close();
  186. }, null);
  187. },
  188. _setNodeEvent: function(){
  189. if (!this.isSetEvents){
  190. this.node.addEvent("click", function(e){
  191. if (!this.form.noSelected) this.selected();
  192. this.form.noSelected = false;
  193. e.stop();
  194. }.bind(this));
  195. this.node.addEvent("mouseover", function(e){
  196. this.over();
  197. e.stop();
  198. }.bind(this));
  199. this.node.addEvent("mouseout", function(e){
  200. this.unOver();
  201. e.stop();
  202. }.bind(this));
  203. this.node.addEvent("copy", function(e){
  204. this.copyModule(e);
  205. });
  206. this._setOtherNodeEvent();
  207. this.isSetEvents = true;
  208. }
  209. },
  210. copyModule: function(e){
  211. },
  212. _setOtherNodeEvent: function(){},
  213. over: function(){
  214. if (!this.form.moveModule) if (this.form.currentSelectedModule!=this){
  215. this.node.store("normalBorder", this.node.getBorder());
  216. this.node.setStyles({
  217. "border-width": "1px",
  218. "border-color": "#4e73ff"
  219. });
  220. }
  221. },
  222. unOver: function(){
  223. if (!this.form.moveModule) if (this.form.currentSelectedModule!=this){
  224. this.node.setStyles({
  225. "border-width": "1px",
  226. "border-color": "#333"
  227. });
  228. var border = this.node.retrieve("normalBorder");
  229. this.node.setStyles(border);
  230. }
  231. },
  232. _showActions: function(){
  233. if (this.actionArea){
  234. if (this.options.actions.length){
  235. this._setActionAreaPosition();
  236. this.actionArea.setStyle("display", "block");
  237. }
  238. }
  239. },
  240. _hideActions: function(){
  241. if (this.actionArea) this.actionArea.setStyle("display", "none");
  242. },
  243. selected: function(){
  244. if (this.form.currentSelectedModule){
  245. if (this.form.currentSelectedModule==this){
  246. return true;
  247. }else{
  248. this.form.currentSelectedModule.unSelected();
  249. }
  250. }
  251. if (this.form.propertyMultiTd){
  252. this.form.propertyMultiTd.hide();
  253. this.form.propertyMultiTd = null;
  254. }
  255. this.form.unSelectedMulti();
  256. // this.node.store("normalBorder", this.node.getBorder());
  257. this.node.setStyles({
  258. "border-width": "1px",
  259. "border-color": "red"
  260. });
  261. this._showActions();
  262. this.form.currentSelectedModule = this;
  263. if (this.treeNode){
  264. this.treeNode.selectNode();
  265. this.treeNode.node.scrollIntoView();
  266. }
  267. //this.form.isFocus = true;
  268. this.showProperty();
  269. },
  270. unSelected: function(){
  271. this.node.setStyles({
  272. "border-width": "1px",
  273. "border-color": "#333"
  274. });
  275. var border = this.node.retrieve("normalBorder");
  276. this.node.setStyles(border);
  277. this._hideActions();
  278. this.form.currentSelectedModule = null;
  279. this.hideProperty();
  280. },
  281. selectedMulti: function(){
  282. if (this.form.selectedModules.indexOf(this)==-1){
  283. this.form.selectedModules.push(this);
  284. this.node.setStyle("border-color", "red");
  285. }
  286. },
  287. unSelectedMulti: function(){
  288. if (this.form.selectedModules.indexOf(this)!=-1){
  289. this.form.selectedModules.erase(this);
  290. this.node.setStyle("border-color", "#333");
  291. }
  292. },
  293. showProperty: function(){
  294. if (!this.property){
  295. this.property = new MWF.xApplication.cms.FormDesigner.Property(this, this.form.designer.propertyContentArea, this.form.designer, {
  296. "path": this.options.propertyPath,
  297. "onPostLoad": function(){
  298. this.property.show();
  299. }.bind(this)
  300. });
  301. this.property.load();
  302. }else{
  303. this.property.show();
  304. }
  305. },
  306. hideProperty: function(){
  307. if (this.property) this.property.hide();
  308. },
  309. create: function(data, e){
  310. this.json = data;
  311. this.json.id = this._getNewId();
  312. this._createMoveNode();
  313. this._setNodeMove(e);
  314. },
  315. _createMoveNode: function(){
  316. this.moveNode = new Element("div", {
  317. "MWFType": "label",
  318. "styles": this.css.moduleNodeMove,
  319. "text": "Text",
  320. "events": {
  321. "selectstart": function(){
  322. return false;
  323. }
  324. }
  325. }).inject(this.form.container);
  326. },
  327. _onEnterOther: function(dragging, inObj){
  328. },
  329. _onLeaveOther: function(dragging, inObj){
  330. },
  331. _setNodeMove: function(e){
  332. this._setMoveNodePosition(e);
  333. var droppables = [this.form.node].concat(this.form.moduleElementNodeList, this.form.moduleContainerNodeList, this.form.moduleComponentNodeList);
  334. var nodeDrag = new Drag.Move(this.moveNode, {
  335. "droppables": droppables,
  336. "onEnter": function(dragging, inObj){
  337. var module = inObj.retrieve("module");
  338. if (module) module._dragIn(this);
  339. this._onEnterOther(dragging, inObj);
  340. }.bind(this),
  341. "onLeave": function(dragging, inObj){
  342. var module = inObj.retrieve("module");
  343. if (module) module._dragOut(this);
  344. this._onLeaveOther(dragging, inObj);
  345. }.bind(this),
  346. "onDrag": function(e){
  347. this._nodeDrag(e, nodeDrag);
  348. }.bind(this),
  349. "onDrop": function(dragging, inObj){
  350. if (inObj){
  351. var module = inObj.retrieve("module");
  352. if (module) module._dragDrop(this);
  353. this._nodeDrop();
  354. }else{
  355. this._dragCancel(dragging);
  356. }
  357. }.bind(this),
  358. "onCancel": function(dragging){
  359. this._dragCancel(dragging);
  360. }.bind(this)
  361. });
  362. nodeDrag.start(e);
  363. this.form.moveModule = this;
  364. this.form.recordCurrentSelectedModule = this.form.currentSelectedModule;
  365. // var d = (new Date()).getTime();
  366. this.form.selected();
  367. //var d1 = (new Date()).getTime();
  368. //alert((d1-d))
  369. },
  370. _setMoveNodePosition: function(e){
  371. // var x = e.event.clientX+2;
  372. // var y = e.event.clientY+2;
  373. var x = e.page.x+2;
  374. var y = e.page.y+2;
  375. this.moveNode.positionTo(x, y);
  376. // this.moveNode.setStyles({
  377. // "top": y,
  378. // "left": x
  379. // });
  380. },
  381. _getCopyNode: function(){
  382. if (!this.copyNode) this._createCopyNode();
  383. this.copyNode.setStyles(this.css.moduleNodeShow);
  384. // this.copyNode.setStyle("display", "block");
  385. return this.copyNode;
  386. },
  387. _createCopyNode: function(){
  388. this.copyNode = this.moveNode.clone();
  389. this.copyNode.setStyles(this.css.moduleNodeShow);
  390. this.copyNode.addEvent("selectstart", function(){
  391. return false;
  392. });
  393. },
  394. _nodeDrop: function(){
  395. if (this.parentContainer){
  396. this._dragComplete();
  397. }else{
  398. this._dragCancel();
  399. }
  400. },
  401. _dragComplete: function(){
  402. if (!this.node){
  403. this._createNode();
  404. }
  405. this._resetTreeNode();
  406. this.node.inject(this.copyNode, "before");
  407. this._initModule();
  408. var thisDisplay = this.node.retrieve("thisDisplay");
  409. if (thisDisplay){
  410. this.node.setStyle("display", thisDisplay);
  411. }
  412. if (this.copyNode) this.copyNode.destroy();
  413. if (this.moveNode) this.moveNode.destroy();
  414. this.moveNode = null;
  415. this.copyNode = null;
  416. this.nextModule = null;
  417. this.form.moveModule = null;
  418. this.form.json.moduleList[this.json.id] = this.json;
  419. this.selected();
  420. },
  421. _resetTreeNode: function(){
  422. if (this.parentContainer){
  423. if (this.treeNode){
  424. if (this.treeNode.parentNode){
  425. var originalModule = this.treeNode.parentNode.module;
  426. // if (originalModule == this.parentContainer){
  427. // if (!this.nextModule) return true;
  428. // };
  429. }
  430. this.treeNode.destroy();
  431. }
  432. this._loadTreeNode(this.parentContainer);
  433. if (this.treeNode.parentNode){
  434. if (!this.treeNode.parentNode.options.expand) this.treeNode.parentNode.expandOrCollapse();
  435. }
  436. this._resetSubTreeNode(this.node)
  437. }
  438. },
  439. _resetSubTreeNode: function(node){
  440. var subNode = node.getFirst();
  441. while (subNode){
  442. var module = subNode.retrieve("module");
  443. if (module) module._resetTreeNode();
  444. this._resetSubTreeNode(subNode);
  445. subNode = subNode.getNext();
  446. }
  447. },
  448. _createNode: function(){
  449. this.node = this.moveNode.clone(true, true);
  450. this.node.setStyles(this.css.moduleNode);
  451. this.node.set("id", this.json.id);
  452. this.node.addEvent("selectstart", function(){
  453. return false;
  454. });
  455. },
  456. _dragCancel: function(){
  457. if (this.node){
  458. var thisDisplay = this.node.retrieve("thisDisplay");
  459. if (thisDisplay){
  460. this.node.setStyle("display", thisDisplay);
  461. }
  462. this.selected();
  463. }else{
  464. this.data = null;
  465. if (this.form.recordCurrentSelectedModule) this.form.recordCurrentSelectedModule.selected();
  466. }
  467. if (this.moveNode) this.moveNode.destroy();
  468. if (this.copyNode) this.copyNode.destroy();
  469. this.copyNode = null;
  470. this.moveNode = null;
  471. this.form.moveModule = null;
  472. },
  473. _nodeDrag: function(e, drag){
  474. if (this.inContainer){
  475. var p = this.inContainer.node.getCoordinates();
  476. var now = drag.mouse.now;
  477. var height = p.height*0.4;
  478. var y = p.top.toFloat()+height.toFloat();
  479. if (this.inContainer == this.parentContainer){
  480. if (this.parentContainer!=this.form){
  481. if (now.x > p.left && now.x < p.right && now.y < y && now.y > p.top){
  482. this.parentContainer.node.setStyles(this.parentContainer.css.moduleNode);
  483. this.parentContainer.node.setStyles(this.parentContainer.json.styles);
  484. this.parentContainer._dragInLikeElement(this);
  485. }
  486. }
  487. }else{
  488. if (now.x > p.left && now.x < p.right && now.y < p.bottom && now.y > y){
  489. this.parentContainer.node.setStyles(this.parentContainer.css.moduleNode);
  490. this.parentContainer.node.setStyles(this.parentContainer.json.styles);
  491. this.inContainer._dragIn(this);
  492. }
  493. }
  494. }
  495. },
  496. setPropertiesOrStyles: function(name){
  497. if (name=="styles"){
  498. this.setCustomStyles();
  499. }
  500. if (name=="properties"){
  501. this.node.setProperties(this.json.properties);
  502. }
  503. },
  504. setCustomStyles: function(){
  505. var border = this.node.getStyle("border");
  506. this.node.clearStyles();
  507. this.node.setStyles(this.css.moduleNode);
  508. if (this.initialStyles) this.node.setStyles(this.initialStyles);
  509. this.node.setStyle("border", border);
  510. Object.each(this.json.styles, function(value, key){
  511. var reg = /^border\w*/ig;
  512. if (!key.test(reg)){
  513. this.node.setStyle(key, value);
  514. }
  515. }.bind(this));
  516. },
  517. _setEditStyle: function(name, obj, oldValue){
  518. if (name=="name"){
  519. var title = this.json.name || this.json.id;
  520. var text = this.json.type.substr(this.json.type.lastIndexOf("$")+1, this.json.type.length);
  521. this.treeNode.setText("<"+text+"> "+title);
  522. }
  523. if (name=="id"){
  524. if (!this.json.name){
  525. var text = this.json.type.substr(this.json.type.lastIndexOf("$")+1, this.json.type.length);
  526. this.treeNode.setText("<"+text+"> "+this.json.id);
  527. }
  528. this.treeNode.setTitle(this.json.id);
  529. this.node.set("id", this.json.id);
  530. }
  531. this._setEditStyle_custom(name, obj, oldValue);
  532. },
  533. _setEditStyle_custom: function(name, obj, oldValue){
  534. },
  535. getHtml: function(){
  536. var copy = this.node.clone(true, true);
  537. copy.clearStyles(true);
  538. this.form._clearNoId(copy);
  539. var html = copy.outerHTML;
  540. copy.destroy();
  541. return html;
  542. },
  543. _getSubModuleJson: function(node, moduleJsons){
  544. var subNode = node.getFirst();
  545. while (subNode){
  546. var module = subNode.retrieve("module");
  547. if (module) {
  548. moduleJsons[module.json.id] = Object.clone(module.json);
  549. }
  550. this._getSubModuleJson(subNode, moduleJsons);
  551. subNode = subNode.getNext();
  552. }
  553. },
  554. getJson: function(){
  555. var json = Object.clone(this.json);
  556. var o = {};
  557. o[json.id] = json;
  558. this._getSubModuleJson(this.node, o);
  559. return o;
  560. }
  561. // dragInElement: function(dragging, inObj, module){
  562. // this.containerNode = module.containerNode;
  563. //
  564. // // var border = this.containerNode.retrieve("thisborder", null);
  565. // // if (!border){
  566. // var top = this.containerNode.getStyle("border-top");
  567. // var left = this.containerNode.getStyle("border-left");
  568. // var bottom = this.containerNode.getStyle("border-bottom");
  569. // var right = this.containerNode.getStyle("border-right");
  570. //
  571. // this.containerNode.store("thisborder", {"top": top, "left": left, "bottom": bottom, "right": right});
  572. // // }
  573. // this.containerNode.setStyles({"border": "1px solid #ffa200"});
  574. //
  575. // if (!this.copyNode) this.createCopyNode(dragging, inObj);
  576. // this.copyNode.inject(inObj, "before");
  577. // },
  578. // dragInContainer: function(dragging, inObj){
  579. // // var border = inObj.retrieve("thisborder", null);
  580. // // if (!border){
  581. // var top = inObj.getStyle("border-top");
  582. // var left = inObj.getStyle("border-left");
  583. // var bottom = inObj.getStyle("border-bottom");
  584. // var right = inObj.getStyle("border-right");
  585. // inObj.store("thisborder", {"top": top, "left": left, "bottom": bottom, "right": right});
  586. // // }
  587. //
  588. // inObj.setStyles({"border": "1px solid #ffa200"});
  589. //
  590. // if (!this.copyNode) this.createCopyNode(dragging, inObj);
  591. //
  592. // this.copyNode.inject(inObj);
  593. //
  594. // this.containerNode = inObj;
  595. // },
  596. //
  597. //
  598. // dragOutElement: function(dragging, inObj){
  599. // var border = this.containerNode.retrieve("thisborder");
  600. // if (border) {
  601. // this.containerNode.setStyles({
  602. // "border-top": border.top,
  603. // "border-left": border.left,
  604. // "border-bottom": border.bottom,
  605. // "border-right": border.right
  606. // });
  607. // }
  608. // this.containerNode = null;
  609. // },
  610. // dragOutContainer: function(dragging, inObj){
  611. // var border = inObj.retrieve("thisborder");
  612. // if (border) {
  613. // inObj.setStyles({
  614. // "border-top": border.top,
  615. // "border-left": border.left,
  616. // "border-bottom": border.bottom,
  617. // "border-right": border.right
  618. // });
  619. // // inObj.setStyles({"border": border});
  620. // }
  621. // if (!this.node){
  622. // if (this.copyNode){
  623. // this.copyNode.destroy();
  624. // this.copyNode = null;
  625. // }
  626. // }
  627. // this.containerNode = null;
  628. // },
  629. //
  630. //
  631. //
  632. //
  633. // dragCancel: function(dragging){
  634. // if (this.node){
  635. // var thisDisplay = this.node.retrieve("thisDisplay");
  636. // if (thisDisplay){
  637. // this.node.setStyle("display", thisDisplay);
  638. // }
  639. // this.selected();
  640. // }else{
  641. // this.data = null;
  642. // if (this.form.recordCurrentSelectedModule) this.form.recordCurrentSelectedModule.selected();
  643. // }
  644. // if (dragging) dragging.destroy();
  645. // if (this.copyNode) this.copyNode.destroy();
  646. // this.copyNode = null;
  647. // this.moveNode = null;
  648. // this.form.moveModule = null;
  649. // }
  650. });