formula: try to update value at init and add unit option
This commit is contained in:
parent
03f9a10173
commit
c1c0076b2a
2 changed files with 5 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
|||
- pads: pips scaling bug
|
||||
- widgets
|
||||
- `css` font-sizes apply correctly to all children (better use percents)
|
||||
- formula: add `unit` option
|
||||
- misc
|
||||
- client-side javascript's size reduced !
|
||||
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ module.exports = class Formula extends _widgets_base {
|
|||
|
||||
formula: '',
|
||||
condition: '',
|
||||
unit: '',
|
||||
|
||||
_osc:'osc',
|
||||
|
||||
|
|
@ -60,7 +61,8 @@ module.exports = class Formula extends _widgets_base {
|
|||
props:{
|
||||
...Input.defaults(),
|
||||
editable:false,
|
||||
precision:this.getProp('precision')
|
||||
precision:this.getProp('precision'),
|
||||
unit: this.getProp('unit')
|
||||
},
|
||||
parent:this, parentNode:this.widget
|
||||
})
|
||||
|
|
@ -90,6 +92,7 @@ module.exports = class Formula extends _widgets_base {
|
|||
|
||||
|
||||
$('body').on(`change.${this.hash}`,this.syncHandle.bind(this))
|
||||
this.updateValue({options:{}})
|
||||
|
||||
this.input.widget.on('change', (e)=>{
|
||||
e.stopPropagation()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue