From e5203117439bc74e1f4a4c588f48f9582385e7b4 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sun, 14 Oct 2018 11:09:31 +0200 Subject: [PATCH] clone: adapt to commit 94da9103e68fd9cfcc8c8ee27d1b997600843cc8 --- src/browser/js/app/widgets/containers/clone.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/browser/js/app/widgets/containers/clone.js b/src/browser/js/app/widgets/containers/clone.js index 71142c1d..7844c6e5 100644 --- a/src/browser/js/app/widgets/containers/clone.js +++ b/src/browser/js/app/widgets/containers/clone.js @@ -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() }