clone: use children list to disable edition instead of querying the DOM

This commit is contained in:
jean-emmanuel 2018-10-14 12:24:02 +02:00
parent dae40b1e2b
commit 0393a12f46

View file

@ -158,7 +158,9 @@ class Clone extends Container {
}
DOM.each(this.widget, '.widget', (el)=>{el.classList.add('not-editable')})
for (var i = 0; i < this.children.length; i++) {
this.children[i].container.classList.add('not-editable')
}
// listen for cloneTarget's deletion
// if it is just edited, its recreation will be catched by the global 'widget-created' event handler