|
@@ -738,11 +738,14 @@ var idTree = {
|
|
} else {
|
|
} else {
|
|
this.roots.splice(node.siblingIndex(), 1);
|
|
this.roots.splice(node.siblingIndex(), 1);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ if(node.preSibling) node.preSibling.setNextSibling(node.nextSibling);//后兄弟设置为前兄弟的后兄弟
|
|
|
|
+
|
|
if(node.children.length>0){
|
|
if(node.children.length>0){
|
|
if(node.preSibling){//子项变成前兄弟的子项
|
|
if(node.preSibling){//子项变成前兄弟的子项
|
|
for(let c of node.children){
|
|
for(let c of node.children){
|
|
node.preSibling.addChild(c);
|
|
node.preSibling.addChild(c);
|
|
- }
|
|
|
|
|
|
+ }
|
|
}else if(node.nextSibling){//没有前兄弟,有后兄弟
|
|
}else if(node.nextSibling){//没有前兄弟,有后兄弟
|
|
let oldChild = node.parent.children;
|
|
let oldChild = node.parent.children;
|
|
node.parent.children = [];
|
|
node.parent.children = [];
|