clone: avoid some unnecessary property checks

This commit is contained in:
jean-emmanuel 2024-12-28 12:10:27 +01:00
parent e56340fd11
commit da4252c6da
2 changed files with 5 additions and 0 deletions

View file

@ -96,8 +96,12 @@ class Clone extends Container() {
}, {context: this})
widgetManager.on('prop-changed', (e)=>{
// watch for prop changes initiated by the editor
// Other changes (from advanced syntaxes) are already
// handled by standard widget mechanicsé
if (!this.cloneTarget) return
if (!e.options.fromEditor) return
if (e.widget === this.cloneTarget || this.cloneTarget.contains(e.widget)) {