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
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue