|
@@ -99,10 +99,10 @@ var TREE_SHEET_CONTROLLER = {
|
|
|
let length = nodes.length;
|
|
|
if (nodes.length > 0) {
|
|
|
TREE_SHEET_HELPER.massOperationSheet(this.sheet, function () {
|
|
|
- that.sheet.addRows(nodes[length - 1].serialNo(), length);
|
|
|
+ that.sheet.addRows(nodes[0].serialNo(), length);
|
|
|
TREE_SHEET_HELPER.refreshTreeNodeData(that.setting, that.sheet, nodes, false);
|
|
|
- that.setTreeSelected(nodes[length - 1]);
|
|
|
- that.sheet.setSelection(nodes[length - 1].serialNo(), sels[0].col, 1, 1);
|
|
|
+ that.setTreeSelected(nodes[0]);
|
|
|
+ that.sheet.setSelection(nodes[0].serialNo(), sels[0].col, 1, 1);
|
|
|
//that.sheet.showRow(newNode.serialNo(), GC.Spread.Sheets.VerticalPosition.center);
|
|
|
});
|
|
|
}
|
|
@@ -183,7 +183,6 @@ var TREE_SHEET_CONTROLLER = {
|
|
|
};
|
|
|
controller.prototype.m_delete = function (nodes) {
|
|
|
var that = this, sels = this.sheet.getSelections();
|
|
|
- debugger;
|
|
|
if (nodes.length > 0) {
|
|
|
if (this.tree.m_delete(nodes)) {
|
|
|
TREE_SHEET_HELPER.massOperationSheet(this.sheet, function () {
|
|
@@ -214,7 +213,6 @@ var TREE_SHEET_CONTROLLER = {
|
|
|
}
|
|
|
};
|
|
|
controller.prototype.downLevel = function () {
|
|
|
- debugger;
|
|
|
var that = this;
|
|
|
if (this.tree.selected) {
|
|
|
if (this.tree.selected.downLevel()) {
|