Port Undo/Redo approach with a clean API

This commit is contained in:
Kevin Jahns
2019-06-23 13:04:14 +02:00
parent 14df5b72af
commit 03458dc641
18 changed files with 793 additions and 290 deletions

View File

@@ -45,12 +45,10 @@ export class YXmlElement extends YXmlFragment {
*/
_integrate (y, item) {
super._integrate(y, item)
this.insert(0, /** @type {Array} */ (this._prelimContent))
this._prelimContent = null
;(/** @type {Map<string, any>} */ (this._prelimAttrs)).forEach((value, key) => {
this.setAttribute(key, value)
})
this._prelimContent = null
this._prelimAttrs = null
}
/**