improved led and fixed knob overflow

This commit is contained in:
jean-emmanuel 2016-03-21 12:33:48 +01:00
parent 33211b863a
commit d13d12d629
4 changed files with 16 additions and 7 deletions

File diff suppressed because one or more lines are too long

View file

@ -36,6 +36,8 @@ module.exports.create = function(widgetData,container) {
led.css('opacity',mapToScale(v,[range.min,range.max],[0,1],widgetData.precision,widgetData.logScale,true))
if (sync) widget.trigger('sync',[widgetData.id,widget])
}
widget.getValue = function(){return}
widget.setValue(range.min)
return widget
}

View file

@ -18,6 +18,7 @@
height: 100%;
display: flex;
align-items: center;
overflow: hidden;
.input {
bottom:0;

View file

@ -5,21 +5,27 @@
flex-shrink: 0;
.led {
padding:10rem;
display: flex;
align-items: center;
height: 100%;
padding:10rem 0;
overflow: hidden;
div {
border-radius: 100%;
width:40rem;
height:40rem;
width:calc(100% - 20rem);
padding-bottom:calc(100% - 20rem);
margin: 0 auto;
overflow: hidden;
background:$color-border;
position: relative;
span {
height:100%;
position: absolute;
top:-1rem;left:-1rem;right:-1rem;bottom:-1rem;
border-radius: 100%;
display:block;
background-color:var(--color-accent);
border: 5rem solid rgba($color-fg,.8);
}
}
}