formula: fix init when formula stirngs are empty and make updateValue method more robust
This commit is contained in:
parent
6659a0a08d
commit
8523c11273
2 changed files with 19 additions and 4 deletions
|
|
@ -1,11 +1,15 @@
|
|||
# Changelog
|
||||
|
||||
## 0.19.6
|
||||
|
||||
- hot fix
|
||||
- broken formula widget
|
||||
|
||||
## 0.19.5
|
||||
|
||||
- launcher
|
||||
- fixed typo in new version message
|
||||
- misc
|
||||
- fixed typo in new version message
|
||||
- misc
|
||||
- client-side javascript's size reduced, now for real !!
|
||||
|
||||
## 0.19.4
|
||||
|
|
|
|||
|
|
@ -117,14 +117,25 @@ module.exports = class Formula extends _widgets_base {
|
|||
updateValue(e){
|
||||
|
||||
var variables = {},
|
||||
id
|
||||
id, n = 0
|
||||
|
||||
for (let id of this.linkedWidgets) {
|
||||
if (id !== undefined) {
|
||||
variables['_'+id] = widgetManager.getWidgetById(id)[0].getValue()
|
||||
let widgets = widgetManager.getWidgetById(id)
|
||||
for (let w of widgets) {
|
||||
if (w.getValue) {
|
||||
variables['_'+id] = w.getValue()
|
||||
n++
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.linkedWidgets.length || n < this.linkedWidgets.length) return
|
||||
|
||||
|
||||
if (this.getProp('condition').length) {
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue