|
@@ -525,7 +525,7 @@ var idTree = {
|
|
|
var nextSibling = nextSiblingID == -1 ? null: this.nodes[this.prefix + nextSiblingID];
|
|
|
let preInsertNode = null,nodes = [];
|
|
|
for(let d of datas){
|
|
|
- let node = new Node(this,d);
|
|
|
+ let node = new Node(this,d.data);
|
|
|
if(preInsertNode == null){
|
|
|
if (nextSibling) {
|
|
|
tools.addNodes(this, parent, [node], nextSibling.siblingIndex());
|
|
@@ -535,7 +535,8 @@ var idTree = {
|
|
|
}else {
|
|
|
tools.addNodes(this, parent, [node], preInsertNode.siblingIndex());
|
|
|
}
|
|
|
- this.nodes[this.prefix + d.ID] = node;
|
|
|
+ this.nodes[this.prefix + d.data.ID] = node;
|
|
|
+ if(preInsertNode) node.setNextSibling(preInsertNode);
|
|
|
preInsertNode = node;
|
|
|
nodes.push(node);
|
|
|
}
|