clone: adapt to commit 94da9103e6

This commit is contained in:
jean-emmanuel 2018-10-14 11:09:31 +02:00
parent aa9d2cdc6b
commit e520311743

View file

@ -103,15 +103,14 @@ class Clone extends Container {
cleanClone() {
if (!this.childrenHashes.length) return
if (!this.children.length) return
//console.log('clear clone',this.getProp('id'))
widgetManager.removeWidgets(this.childrenHashes)
widgetManager.removeWidgets(this.children)
this.widget.innerHTML = ''
this.childrenHashes = []
this.children = []
this.container.classList.remove(...this.cloneClass)
this.container.classList.add('clone-container', 'empty')
this.cloneClass = []
if (this.cloneTarget) widgetManager.off(`widget-removed.${this.hash}`)
}
@ -189,7 +188,6 @@ class Clone extends Container {
onRemove(){
widgetManager.off(`widget-removed.${this.hash}`)
super.onRemove()
}