| 
					
				 | 
			
			
				@@ -31,7 +31,7 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 var sels = me.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 newNodes.sort(function (a, b) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     let rst = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if(a.serialNo() > b.serialNo()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (a.serialNo() > b.serialNo()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         rst = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     else { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -39,10 +39,10 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     return rst; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                for(let newNode of newNodes){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (let newNode of newNodes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     me.sheet.addRows(newNode.serialNo(), 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                for(let newNode of newNodes){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                for (let newNode of newNodes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     me.setTreeSelected(newNode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     TREE_SHEET_HELPER.refreshTreeNodeData(me.setting, me.sheet, [newNode], false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     me.sheet.setSelection(newNode.serialNo(), sels[0].col, 1, 1); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -51,7 +51,7 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         controller.prototype.insert = function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var newNode = null, that = this,  sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var newNode = null, that = this, sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (this.tree) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (this.tree.selected) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     newNode = this.tree.insert(this.tree.selected.getParentID(), this.tree.selected.getNextSiblingID()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -70,10 +70,10 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         controller.prototype.m_insert = function (datas) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            let nodes = [], that = this,  sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(this.tree){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            let nodes = [], that = this, sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (this.tree) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (this.tree.selected) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    nodes = this.tree.m_insert(datas,this.tree.selected.getParentID(), this.tree.selected.getNextSiblingID()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    nodes = this.tree.m_insert(datas, this.tree.selected.getParentID(), this.tree.selected.getNextSiblingID()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     nodes = this.tree.m_insert(datas); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -88,11 +88,12 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     //that.sheet.showRow(newNode.serialNo(), GC.Spread.Sheets.VerticalPosition.center); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return nodes; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         controller.prototype.insertByID = function (ID) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var newNode = null, that = this,  sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var newNode = null, that = this, sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (this.tree) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (this.tree.selected) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     newNode = this.tree.insertByID(ID, this.tree.selected.getParentID(), this.tree.selected.getNextSiblingID()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -112,7 +113,7 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return newNode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         controller.prototype.insertByIDS = function (ID, ParentID, NexSiblingID) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var newNode = null, that = this,  sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var newNode = null, that = this, sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (this.tree) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (this.tree.selected) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     newNode = this.tree.insertByID(ID, ParentID, NexSiblingID); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -132,7 +133,7 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return newNode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         controller.prototype.insertToChild = function (ID, ParentID, NextSiblingID) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            var newNode = null, that = this,  sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var newNode = null, that = this, sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (this.tree) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (this.tree.selected) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     newNode = this.tree.insertByID(ID, ParentID, NextSiblingID); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -164,16 +165,16 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         controller.prototype.m_delete = function (nodes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var that = this, sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(nodes.length > 0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(this.tree.m_delete(nodes)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (nodes.length > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (this.tree.m_delete(nodes)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     TREE_SHEET_HELPER.massOperationSheet(this.sheet, function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         let rowCount = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        for(let node of nodes){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            rowCount = rowCount+node.posterityCount() + 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        for (let node of nodes) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            rowCount = rowCount + node.posterityCount() + 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         that.sheet.deleteRows(sels[0].row, rowCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         that.setTreeSelected(that.tree.items[sels[0].row]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        that.sheet.setSelection(sels[0].row,sels[0].col,1,sels[0].colCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        that.sheet.setSelection(sels[0].row, sels[0].col, 1, sels[0].colCount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -184,7 +185,7 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (this.tree.selected.upLevel()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     TREE_SHEET_HELPER.massOperationSheet(this.sheet, function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         TREE_SHEET_HELPER.refreshNodesVisible([that.tree.selected], that.sheet, true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                       // that.sheet.showRow(that.tree.selected.serialNo(), GC.Spread.Sheets.VerticalPosition.center); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        // that.sheet.showRow(that.tree.selected.serialNo(), GC.Spread.Sheets.VerticalPosition.center); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (that.event.refreshBaseActn) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             that.event.refreshBaseActn(that.tree); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -235,12 +236,12 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var that = this, sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (this.tree.selected) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 TREE_SHEET_HELPER.massOperationSheet(this.sheet, function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet,that.tree,that.tree.selected,that.tree.selected.serialNo(),true);//为了处理移动前子项是隐藏的情况,先把所有的列设置为显示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet,that.tree,that.tree.selected.preSibling,that.tree.selected.preSibling.serialNo(),true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet, that.tree, that.tree.selected, that.tree.selected.serialNo(), true);//为了处理移动前子项是隐藏的情况,先把所有的列设置为显示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet, that.tree, that.tree.selected.preSibling, that.tree.selected.preSibling.serialNo(), true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (that.tree.selected.upMove()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         TREE_SHEET_HELPER.refreshTreeNodeData(that.setting, that.sheet, [that.tree.selected, that.tree.selected.nextSibling], true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet,that.tree,that.tree.selected,that.tree.selected.serialNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet,that.tree,that.tree.selected.nextSibling,that.tree.selected.nextSibling.serialNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet, that.tree, that.tree.selected, that.tree.selected.serialNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet, that.tree, that.tree.selected.nextSibling, that.tree.selected.nextSibling.serialNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         that.sheet.setSelection(that.tree.selected.serialNo(), sels[0].col, 1, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (that.event.refreshBaseActn) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             that.event.refreshBaseActn(that.tree); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -253,12 +254,12 @@ var TREE_SHEET_CONTROLLER = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             var that = this, sels = this.sheet.getSelections(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (this.tree.selected) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 TREE_SHEET_HELPER.massOperationSheet(this.sheet, function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet,that.tree,that.tree.selected,that.tree.selected.serialNo(),true);//为了处理移动前子项是隐藏的情况,先把所有的列设置为显示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet,that.tree,that.tree.selected.nextSibling,that.tree.selected.nextSibling.serialNo(),true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet, that.tree, that.tree.selected, that.tree.selected.serialNo(), true);//为了处理移动前子项是隐藏的情况,先把所有的列设置为显示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet, that.tree, that.tree.selected.nextSibling, that.tree.selected.nextSibling.serialNo(), true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (that.tree.selected.downMove()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         TREE_SHEET_HELPER.refreshTreeNodeData(that.setting, that.sheet, [that.tree.selected, that.tree.selected.preSibling], true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet,that.tree,that.tree.selected,that.tree.selected.serialNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet,that.tree,that.tree.selected.preSibling,that.tree.selected.preSibling.serialNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet, that.tree, that.tree.selected, that.tree.selected.serialNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        TREE_SHEET_HELPER.refreshChildrenVisiable(that.sheet, that.tree, that.tree.selected.preSibling, that.tree.selected.preSibling.serialNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         that.sheet.setSelection(that.tree.selected.serialNo(), sels[0].col, 1, 1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if (that.event.refreshBaseActn) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             that.event.refreshBaseActn(that.tree); 
			 |