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:
parent
782c49db8a
commit
4c51dc6f67
5 changed files with 30 additions and 10 deletions
File diff suppressed because one or more lines are too long
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -905,10 +905,19 @@ a {
|
|||
flex-shrink: 0;
|
||||
}
|
||||
.xy-wrapper {
|
||||
|
||||
&.manual-height {
|
||||
height:100%;
|
||||
.xy {
|
||||
padding-top:0;
|
||||
height:100%;
|
||||
}
|
||||
}
|
||||
overflow: hidden;
|
||||
padding-bottom: 70rem;
|
||||
.value {
|
||||
width:100%;
|
||||
position: absolute;
|
||||
bottom:0;
|
||||
}
|
||||
input {
|
||||
width:50%;
|
||||
|
|
@ -926,7 +935,7 @@ a {
|
|||
width:auto;
|
||||
margin-left: 1rem;
|
||||
margin-right:1rem;
|
||||
padding-bottom: 90%;
|
||||
padding-top:90%;
|
||||
overflow: hidden;
|
||||
background: rgba($color-base,.5);
|
||||
cursor: -webkit-grab;
|
||||
|
|
@ -977,6 +986,7 @@ a {
|
|||
|
||||
|
||||
.rgb-wrapper {
|
||||
padding-bottom: 100rem;
|
||||
input {
|
||||
width:33.33%;
|
||||
}
|
||||
|
|
@ -1004,18 +1014,19 @@ a {
|
|||
background:$color-text;
|
||||
}
|
||||
&:after {
|
||||
box-shadow: 0 0 0 1000rem rgba($color-base,.5);
|
||||
box-shadow: 0 0 0 2000rem rgba($color-base,.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
.hue {
|
||||
width:auto;
|
||||
margin-left: 1rem;
|
||||
margin-right:1rem;
|
||||
height:30rem;
|
||||
background:transparent linear-gradient(to left, #F00, #FF0080, #F0F, #8000FF, #00F, #0080FF, #0FF, #00FF80, #0F0, #80FF00, #FF0, #FF8000, #F00) repeat scroll 0% 0%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
position: absolute;
|
||||
bottom:70rem;
|
||||
left:1rem;
|
||||
right:1rem;
|
||||
cursor: -webkit-grab;
|
||||
&:active {
|
||||
cursor: -webkit-grabbing;
|
||||
|
|
@ -1053,7 +1064,7 @@ a {
|
|||
width:20rem;
|
||||
border:none!important;
|
||||
border-radius: 100%!important;
|
||||
box-shadow: 0 0 0 1000rem rgba($color-base,.5);
|
||||
box-shadow: 0 0 0 2000rem rgba($color-base,.5);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue