widgets: remove unnused properties to avoid having hidden properties laying around when the type changes (especially dangerous when those properties where linked to other widgets)
This commit is contained in:
parent
f49dbfe07e
commit
9f9da33e0f
2 changed files with 10 additions and 1 deletions
|
|
@ -1,10 +1,15 @@
|
|||
# Changelog
|
||||
|
||||
## 0.33.1
|
||||
|
||||
- bug fixes
|
||||
- widgets: remove unnused properties to avoid having hidden properties laying around when the type changes (especially dangerous when those properties where linked to other widgets)
|
||||
|
||||
## 0.33.0
|
||||
|
||||
- bug fixes
|
||||
- osc receivers: unregister properly when widgets are recreated (memory leak); allow non-string values (eg. objects)
|
||||
- circular property update issues
|
||||
- circular property update issues
|
||||
- widgets
|
||||
- **new** generic `matrix` widget
|
||||
- fader: restore right-click focusing the input in compact mode (mouse only)
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ var Parser = class Parser {
|
|||
if (i.indexOf('_')!=0 && props[i]===undefined) props[i] = defaults[i]
|
||||
}
|
||||
|
||||
for (let j in props) {
|
||||
if (defaults[j] === undefined || j[0] === '_') delete props[j]
|
||||
}
|
||||
|
||||
// Genrate widget's id, based on its type
|
||||
if (props.id=='auto' || !props.id ) {
|
||||
var id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue