clone: make props property dynamic (avoid full widget rebuild when possible)

This commit is contained in:
bordun 2020-12-09 17:14:19 +01:00
parent 97c31aca17
commit 79ce7e6bac
2 changed files with 8 additions and 1 deletions

View file

@ -293,6 +293,9 @@ class Clone extends Container() {
this.bindTarget(this.getCloneTarget())
if (this.cloneTarget) this.createClone()
return
case 'props':
if (this.children[0]) this.updateClone()
return
case 'colorText':
case 'colorWidget':
case 'colorFill':
@ -322,7 +325,8 @@ class Clone extends Container() {
}
Clone.dynamicProps = Clone.prototype.constructor.dynamicProps.concat(
'widgetId'
'widgetId',
'props'
)
module.exports = Clone