- nogauge mode for knob
This commit is contained in:
parent
1911d6845e
commit
31fe713188
5 changed files with 25 additions and 16 deletions
|
|
@ -116,7 +116,8 @@ It can also be a self invoking function that returns an array of objects :
|
|||
type:'knob',
|
||||
range: {min:0,max:1}, // [object] minimum and maximum values
|
||||
unit: false, // [string] value suffix
|
||||
absolute:false // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
absolute:false, // [bool] set to true for absolute value on touch/click instead of relative dragging
|
||||
gauge:true // [bool] set to false to replace the gauge with a simple dot
|
||||
```
|
||||
|
||||
- **xy**
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -617,6 +617,8 @@ createWidget.knob = function(widgetData) {
|
|||
unit = widgetData.unit?' '+widgetData.unit.trim(): '',
|
||||
absolute = widgetData.absolute
|
||||
|
||||
if (widgetData.gauge==false) widget.addClass('nogauge')
|
||||
|
||||
|
||||
var pipmin = Math.abs(range.min)>=1000?range.min/1000+'k':range.min,
|
||||
pipmax = Math.abs(range.max)>=1000?range.max/1000+'k':range.max;
|
||||
|
|
|
|||
|
|
@ -1119,6 +1119,25 @@ form {
|
|||
z-index: 1;
|
||||
}
|
||||
|
||||
&.nogauge {
|
||||
.knob-mask:after {
|
||||
display: none;
|
||||
}
|
||||
.knob-wrapper .knob:after {
|
||||
content:"";
|
||||
position:absolute;
|
||||
top:auto;
|
||||
bottom:6rem;
|
||||
left:6rem;
|
||||
height:7rem;
|
||||
width:7rem;
|
||||
background:$color-accent;
|
||||
border:none!important;
|
||||
border-radius: 100%!important;
|
||||
box-shadow: 0 0 0 2px mix($color-text,$color-fg,2);
|
||||
}
|
||||
}
|
||||
|
||||
.knob-wrapper {
|
||||
padding:5rem 20rem;
|
||||
margin:0 auto;
|
||||
|
|
@ -1214,19 +1233,6 @@ form {
|
|||
}
|
||||
}
|
||||
|
||||
// no color gauge test
|
||||
&.dot:after {
|
||||
content:"";
|
||||
position:absolute;
|
||||
bottom:11rem;
|
||||
left:12rem;
|
||||
height:4rem;
|
||||
width:4rem;
|
||||
transform: rotate(45deg);
|
||||
background:$color-accent;
|
||||
border:0!important;
|
||||
}
|
||||
|
||||
}
|
||||
.pip {
|
||||
position:absolute;
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ app.on('ready', function() {
|
|||
{
|
||||
label: 'Restart',
|
||||
accelerator: 'CmdOrCtrl+R',
|
||||
click: function() { window.reload(); }//restartApp
|
||||
click: restartApp// function() { window.reload(); }//restartApp
|
||||
},
|
||||
{
|
||||
label: 'Toggle DevTools',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue