editor: avoid rebuild for dynamic props even if they contain listeners (if so, refresh prop cache and listeners)
This commit is contained in:
parent
8ccf246a06
commit
e98da4c01d
1 changed files with 11 additions and 2 deletions
|
|
@ -26,15 +26,24 @@ function updateWidget(widget, options={}) {
|
|||
Object.values(widget.oscReceivers).forEach(r => linkedProps = linkedProps.concat(r.propNames))
|
||||
|
||||
if (
|
||||
!propValues.some(x => typeof x === 'string' && x.match(/OSC\{|@\{/))
|
||||
&& !propNames.some(n => linkedProps.includes(n))
|
||||
!propNames.some(n => !widget.constructor.dynamicProps.includes(n))
|
||||
) {
|
||||
|
||||
var edited = widget.updateProps(options.changedProps, null) || widget
|
||||
|
||||
if (
|
||||
!propValues.some(x => typeof x === 'string' && x.match(/OSC\{|@\{/))
|
||||
&& !propNames.some(n => linkedProps.includes(n))
|
||||
) {
|
||||
widget.createPropsCache()
|
||||
}
|
||||
|
||||
if (editor.selectedWidgets.includes(widget) && !options.preventSelect) {
|
||||
editor.select(edited)
|
||||
}
|
||||
return edited
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue