Merge branch 'master' of github.com:jean-emmanuel/open-stage-control
This commit is contained in:
commit
b6c73c2318
5 changed files with 40 additions and 14 deletions
File diff suppressed because one or more lines are too long
|
|
@ -12,6 +12,7 @@ module.exports.options = {
|
|||
top:'auto',
|
||||
width:'auto',
|
||||
height:'auto',
|
||||
color:'auto',
|
||||
css:'',
|
||||
|
||||
separator2:'osc',
|
||||
|
|
@ -27,12 +28,16 @@ module.exports.create = function(widgetData,container) {
|
|||
|
||||
var widget = $(`
|
||||
<div class="push toggle">
|
||||
<div class="light"</div>
|
||||
</div>\
|
||||
`),
|
||||
$document = $(document)
|
||||
$document = $(document),
|
||||
light = widget.find('.light')[0]
|
||||
|
||||
widget.value = widget.find('span')
|
||||
|
||||
if (widgetData.color!='auto') light.setAttribute('style',`background:${widgetData.color}`)
|
||||
|
||||
widget.on('drag',function(e){e.stopPropagation()})
|
||||
widget.on('draginit.push',function(){
|
||||
widget.off('draginit.push')
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ module.exports.options = {
|
|||
top:'auto',
|
||||
width:'auto',
|
||||
height:'auto',
|
||||
color:'auto',
|
||||
css:'',
|
||||
|
||||
separator2:'osc',
|
||||
|
|
@ -29,10 +30,13 @@ module.exports.create = function(widgetData,container) {
|
|||
<div class="light"></div>
|
||||
</div>\
|
||||
`),
|
||||
$document = $(document)
|
||||
$document = $(document),
|
||||
light = widget.find('.light')[0]
|
||||
|
||||
widget.value = widget.find('span')
|
||||
|
||||
if (widgetData.color!='auto') light.setAttribute('style',`background:${widgetData.color}`)
|
||||
|
||||
widget.on('drag',function(e){e.stopPropagation()})
|
||||
widget.on('draginit.toggle',function(){
|
||||
widget.off('draginit.toggle')
|
||||
|
|
|
|||
|
|
@ -25,13 +25,23 @@
|
|||
}
|
||||
|
||||
cursor: pointer;
|
||||
.label {
|
||||
|
||||
.push {
|
||||
&.on {
|
||||
animation:none;
|
||||
background: $color-accent;
|
||||
}
|
||||
border-bottom:4rem solid $color-fg;
|
||||
.light {
|
||||
position: absolute;
|
||||
left:auto;
|
||||
background: transparent;
|
||||
height:4rem;
|
||||
width:4rem;
|
||||
border-radius: 4rem;
|
||||
&:after {
|
||||
content: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.push {
|
||||
&.on {
|
||||
animation:none;
|
||||
background: $color-accent;
|
||||
}
|
||||
border-bottom:4rem solid $color-fg;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,10 +37,17 @@
|
|||
right:4rem;
|
||||
top:4rem;
|
||||
height:4rem;
|
||||
background: $color-track;
|
||||
pointer-events: none;
|
||||
}
|
||||
&.on .light {
|
||||
background: $color-accent;
|
||||
&:after {
|
||||
content:"";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
background: $color-track;
|
||||
}
|
||||
}
|
||||
&.on .light:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue