input: rename prop horizontal to vertical
This commit is contained in:
parent
0472bb2c28
commit
492b117f49
6 changed files with 25 additions and 24 deletions
|
|
@ -13,6 +13,7 @@
|
|||
- cli
|
||||
- added `--instance-name` option to differenciate mulitple instances in zeroconf networks
|
||||
- widgets
|
||||
- inputs: renamed `input`'s property `horizontal` to `vertical` to match how the widget actually displays
|
||||
- sliders: **new** `range` widget
|
||||
- plots: **new** `image` widget
|
||||
- remote control
|
||||
|
|
|
|||
|
|
@ -281,7 +281,6 @@
|
|||
"label": false,
|
||||
"width": 50,
|
||||
"color": "auto",
|
||||
"css": "font-size:90%;",
|
||||
"horizontal": true,
|
||||
"stretch": true,
|
||||
"border": false,
|
||||
|
|
@ -310,19 +309,20 @@
|
|||
"widgetId": "trim_knob_@{parent.variables.n}",
|
||||
"linkId": "",
|
||||
"unit": "",
|
||||
"horizontal": true,
|
||||
"editable": true,
|
||||
"precision": 1,
|
||||
"target": [],
|
||||
"value": "",
|
||||
"address": "/trim_input_@{parent.variables.n}",
|
||||
"width": "auto",
|
||||
"css": ""
|
||||
"css": "",
|
||||
"vertical": true
|
||||
}
|
||||
],
|
||||
"_style": "style",
|
||||
"_children": "children",
|
||||
"scroll": true,
|
||||
"css": "",
|
||||
"_geometry": "geometry",
|
||||
"_panel": "panel",
|
||||
"layout": "",
|
||||
|
|
@ -583,7 +583,6 @@
|
|||
"label": false,
|
||||
"unit": "dB",
|
||||
"height": 30,
|
||||
"horizontal": false,
|
||||
"color": "auto",
|
||||
"css": "margin:5rem 5rem 0",
|
||||
"widgetId": "fader_@{parent.variables.n}",
|
||||
|
|
@ -592,7 +591,8 @@
|
|||
"precision": 2,
|
||||
"preArgs": [],
|
||||
"target": [],
|
||||
"address": "/fader_input_@{parent.variables.n}"
|
||||
"address": "/fader_input_@{parent.variables.n}",
|
||||
"vertical": false
|
||||
},
|
||||
{
|
||||
"type": "fader",
|
||||
|
|
@ -938,7 +938,6 @@
|
|||
"label": false,
|
||||
"width": 50,
|
||||
"color": "auto",
|
||||
"css": "font-size:90%;",
|
||||
"horizontal": true,
|
||||
"stretch": true,
|
||||
"border": false,
|
||||
|
|
@ -967,19 +966,20 @@
|
|||
"widgetId": "mastertrim",
|
||||
"linkId": "",
|
||||
"unit": "",
|
||||
"horizontal": true,
|
||||
"editable": true,
|
||||
"precision": 1,
|
||||
"target": [],
|
||||
"value": "",
|
||||
"address": "/mastertrim_input",
|
||||
"width": "auto",
|
||||
"css": ""
|
||||
"css": "",
|
||||
"vertical": true
|
||||
}
|
||||
],
|
||||
"_style": "style",
|
||||
"_children": "children",
|
||||
"scroll": true,
|
||||
"css": "",
|
||||
"_geometry": "geometry",
|
||||
"_panel": "panel",
|
||||
"layout": "",
|
||||
|
|
@ -1192,7 +1192,6 @@
|
|||
"label": false,
|
||||
"unit": "dB",
|
||||
"height": 30,
|
||||
"horizontal": false,
|
||||
"color": "auto",
|
||||
"css": "margin:5rem 5rem 0",
|
||||
"widgetId": "Master",
|
||||
|
|
@ -1201,7 +1200,8 @@
|
|||
"precision": 2,
|
||||
"preArgs": [],
|
||||
"target": [],
|
||||
"address": "/master_input"
|
||||
"address": "/master_input",
|
||||
"vertical": false
|
||||
},
|
||||
{
|
||||
"type": "fader",
|
||||
|
|
@ -1922,7 +1922,6 @@
|
|||
"label": false,
|
||||
"width": 50,
|
||||
"color": "auto",
|
||||
"css": "font-size:90%;",
|
||||
"horizontal": true,
|
||||
"stretch": true,
|
||||
"border": false,
|
||||
|
|
@ -1952,18 +1951,19 @@
|
|||
"widgetId": "select_trim_knob",
|
||||
"linkId": "",
|
||||
"unit": "",
|
||||
"horizontal": true,
|
||||
"editable": true,
|
||||
"precision": 1,
|
||||
"target": [],
|
||||
"address": "/select_trim_input",
|
||||
"value": "",
|
||||
"width": "auto"
|
||||
"width": "auto",
|
||||
"vertical": true
|
||||
}
|
||||
],
|
||||
"_style": "style",
|
||||
"_children": "children",
|
||||
"scroll": true,
|
||||
"css": "",
|
||||
"_geometry": "geometry",
|
||||
"_panel": "panel",
|
||||
"layout": "",
|
||||
|
|
@ -2320,7 +2320,6 @@
|
|||
"label": false,
|
||||
"unit": "dB",
|
||||
"height": 30,
|
||||
"horizontal": false,
|
||||
"color": "auto",
|
||||
"css": "margin:5rem 5rem 0",
|
||||
"widgetId": "fader_select",
|
||||
|
|
@ -2329,7 +2328,8 @@
|
|||
"precision": 2,
|
||||
"preArgs": [],
|
||||
"target": [],
|
||||
"address": "/fader_input_select"
|
||||
"address": "/fader_input_select",
|
||||
"vertical": false
|
||||
},
|
||||
{
|
||||
"type": "fader",
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ module.exports = class Input extends _canvas_base {
|
|||
|
||||
_input:'input',
|
||||
|
||||
horizontal:false,
|
||||
vertical:false,
|
||||
unit: '',
|
||||
widgetId:'',
|
||||
editable:true,
|
||||
|
|
@ -55,8 +55,8 @@ module.exports = class Input extends _canvas_base {
|
|||
this.value = ''
|
||||
this.stringValue = ''
|
||||
|
||||
if (this.getProp('horizontal')) {
|
||||
this.widget.addClass('horizontal')
|
||||
if (this.getProp('vertical')) {
|
||||
this.widget.addClass('vertical')
|
||||
}
|
||||
|
||||
if (this.getProp('editable')) {
|
||||
|
|
@ -132,7 +132,7 @@ module.exports = class Input extends _canvas_base {
|
|||
|
||||
super.resizeHandle(...arguments)
|
||||
|
||||
if (this.getProp('horizontal')){
|
||||
if (this.getProp('vertical')){
|
||||
this.ctx.setTransform(1, 0, 0, 1, 0, 0)
|
||||
this.ctx.rotate(-Math.PI/2)
|
||||
this.ctx.translate(-this.height, 0)
|
||||
|
|
@ -177,8 +177,8 @@ module.exports = class Input extends _canvas_base {
|
|||
draw() {
|
||||
|
||||
var v = this.stringValue,
|
||||
width = this.getProp('horizontal') ? this.height : this.width,
|
||||
height = !this.getProp('horizontal') ? this.height : this.width
|
||||
width = this.getProp('vertical') ? this.height : this.width,
|
||||
height = !this.getProp('vertical') ? this.height : this.width
|
||||
|
||||
if (this.getProp('unit') && v.length) v += ' ' + this.getProp('unit')
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ module.exports = class _sliders_base extends _canvas_base {
|
|||
...Input.defaults(),
|
||||
precision:this.getProp('precision'),
|
||||
unit:this.getProp('unit'),
|
||||
horizontal: this.getProp('type') == 'fader' && this.getProp('compact') && !this.getProp('horizontal')
|
||||
vertical: this.getProp('type') == 'fader' && this.getProp('compact') && !this.getProp('horizontal')
|
||||
},
|
||||
parent:this, parentNode:this.widget
|
||||
})
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ module.exports = class Range extends _widgets_base {
|
|||
props:{...Input.defaults(),
|
||||
precision:this.getProp('precision'),
|
||||
unit:this.getProp('unit'),
|
||||
horizontal: this.getProp('compact') && !this.getProp('horizontal')
|
||||
vertical: this.getProp('compact') && !this.getProp('horizontal')
|
||||
},
|
||||
parent:this, parentNode:this.widget,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
width: 100rem;
|
||||
height: 60rem;
|
||||
padding:1rem;
|
||||
.horizontal {
|
||||
.vertical {
|
||||
input {
|
||||
transform: rotate(-90deg);
|
||||
vertical-align: middle;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue