fixed inserting large xml portions

This commit is contained in:
Kevin Jahns
2017-10-27 22:28:32 +02:00
parent 1dea8f394f
commit c619aa33d9
6 changed files with 58 additions and 20 deletions

View File

@@ -22,6 +22,14 @@ export default class Type extends Item {
this._y = null
this._eventHandler = new EventHandler()
}
_transact (f) {
const y = this._y
if (y !== null) {
y.transact(f)
} else {
f(y)
}
}
observe (f) {
this._eventHandler.addEventListener(f)
}
@@ -41,8 +49,9 @@ export default class Type extends Item {
}
// integrate map children
const map = this._map
for (let [key, t] of map) {
map.delete(key)
this._map = new Map()
for (let t of map.values()) {
// TODO make sure that right elements are deleted!
integrateChildren(y, t)
}
}