serialize newly added nodes and update id node map when childList changed

This commit is contained in:
Yanzhen Yu
2018-10-09 10:52:20 +08:00
parent 1f10b70d30
commit 46ab1d6e80
3 changed files with 8 additions and 2 deletions

View File

@@ -17,6 +17,10 @@ export const mirror: Mirror = {
getNode(id) {
return mirror.map[id];
},
removeNodeFromMap(n) {
const id = n.__sn && n.__sn.id;
delete mirror.map[id];
},
};
// copy from underscore