height can be set on xy/rgb pads

+ widget sync fix (check if there is a value)
+ some style fixes
This commit is contained in:
jean-emmanuel 2015-11-03 17:10:04 +01:00
parent 782c49db8a
commit 4c51dc6f67
5 changed files with 30 additions and 10 deletions

View file

@ -104,7 +104,7 @@ init = function(session,callback) {
return function() {
var v = widget[x].getValue()
for (k=0;k<widget.length;k++) {
if (x!=k) {
if (x!=k && v!==undefined) {
widget[k].setValue(v,false,false)
}
}

View file

@ -91,7 +91,11 @@ parsewidgets = function(widgets,parent) {
var width = parseInt(widgetData.width)==widgetData.width?parseInt(widgetData.width)+'rem' : widgetData.width,
style = widgetData.width!='auto'?`width:${width};min-width:${width}`:''
height = parseInt(widgetData.height)==widgetData.height?parseInt(widgetData.height)+'rem' : widgetData.height,
styleW = widgetData.width!='auto'?`width:${width};min-width:${width}`:'',
styleH = widgetData.height!='auto'?`height:${height};min-height:${height}`:'',
style = styleW + ';' + styleH

View file

@ -46,6 +46,7 @@ widgetOptions = {
id:'auto',
label:'auto',
width:'auto',
height:'auto',
split:false,
range:{x:{min:0,max:1},y:{min:0,max:1}},
absolute:false,
@ -56,6 +57,7 @@ widgetOptions = {
id:'auto',
label:'auto',
width:'auto',
height:'auto',
split:false,
absolute:false,
path:'auto',
@ -270,6 +272,8 @@ createWidget.xy = function(widgetData) {
:false
if (widgetData.height!='auto') widget.addClass('manual-height')
pad.width = pad.innerWidth()
pad.height = pad.innerHeight()
handle.height = 0
@ -409,6 +413,7 @@ createWidget.rgb = function(widgetData) {
widgetData.split:{r:widgetData.path+'/r',g:widgetData.path+'/g',b:widgetData.path+'/b'}
:false
if (widgetData.height!='auto') widget.addClass('manual-height')
pad.width = pad.innerWidth()