Skip to content

Commit

Permalink
update index after node is moved to other parent
Browse files Browse the repository at this point in the history
  • Loading branch information
hizzgdev committed Mar 14, 2024
1 parent 990b53c commit f65b4f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/jsmind.mind.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,10 @@ export class Mind {
break;
}
}
let origin_parent = node.parent;
node.parent = parent_node;
parent_node.children.push(node);
this._update_index(origin_parent);
}

if (node.parent.isroot) {
Expand Down

0 comments on commit f65b4f9

Please sign in to comment.