some quircks removed, and removed min-width/height setting in parser (useless)

This commit is contained in:
jean-emmanuel 2016-02-26 15:01:38 +01:00
parent de376d6d28
commit d840e4abc0
7 changed files with 13 additions and 12 deletions

File diff suppressed because one or more lines are too long

View file

@ -66,7 +66,7 @@ module.exports.enable = function(){
newContainer.children().first().click()
$('#sidepanel').scrollTop(scroll)
if (data.tabs && data.tabs.length) tabs()
if (data.tabs && data.tabs.length) require('./ui')
}

View file

@ -112,8 +112,8 @@ module.exports.widgets = function(data,parent) {
top = parseFloat(widgetData.top)==widgetData.top?parseFloat(widgetData.top)+'rem' : widgetData.top
var styleW = widgetData.width&&widgetData.width!='auto'?`width:${width};min-width:${width};`:'',
styleH = widgetData.height&&widgetData.height!='auto'?`height:${height};min-height:${height};`:'',
var styleW = widgetData.width&&widgetData.width!='auto'?`width:${width};amin-width:${width};`:'',
styleH = widgetData.height&&widgetData.height!='auto'?`height:${height};amin-height:${height};`:'',
styleL = widgetData.left&&widgetData.left!='auto'||widgetData.left==0?`left:${left};`:'',
styleT = widgetData.top&&widgetData.top!='auto'||widgetData.top==0?`top:${top};`:''

View file

@ -1,3 +1,6 @@
var utils = require('./utils'),
mapToScale = utils.mapToScale
module.exports.options = {
type:'led',
id:'auto',

View file

@ -180,8 +180,7 @@ module.exports.create = function(widgetData,container) {
return [rgb.r,rgb.g,rgb.b]
}
widget.setValue = function(v,send,sync) {
if (v[1]==undefined && v[2]==undefined) var v = [v,v,v]
if (v[2]==undefined) var v = [v[0],v[1],v[1]]
if (!v || v.length!=3) return
for (i in [0,1,2]) {
v[i] = clip(v[i],[0,255])
@ -267,7 +266,7 @@ module.exports.create = function(widgetData,container) {
widget.setValue([v[0],v[1],b],true,true)
})
widget.setValue(0)
widget.setValue([0,0,0])
return widget
}

View file

@ -119,7 +119,7 @@ module.exports.create = function(widgetData,container) {
return [x,y]
}
widget.setValue = function(v,send,sync) {
if (v[1]==undefined) var v = [v,v]
if (!v || v.length!=2) return
for (i in [0,1]) {
v[i] = clip(v[i],[range[['x','y'][i]].min,range[['x','y'][i]].max])
@ -177,6 +177,6 @@ module.exports.create = function(widgetData,container) {
widget.setValue(v,true,true)
})
widget.setValue(range.x.min,range.y.min)
widget.setValue([range.x.min,range.y.min])
return widget
}

View file

@ -664,7 +664,6 @@ a {
.widget {
display:inline-block;
height:auto;
min-width: 100rem;
overflow: hidden;
position:relative;
font-size:13rem;
@ -676,6 +675,8 @@ a {
-webkit-tap-highlight-color:transparent;
border-right:6rem solid transparent;
border-bottom:6rem solid transparent;
min-height:30rem;
min-width:30rem;
&:before {
@ -850,7 +851,6 @@ a {
padding-top: 35rem;
.strip > .widget {
border:0!important;
min-width:auto!important;
max-width: 100%;
margin-top:-1rem;
}
@ -860,7 +860,6 @@ a {
padding-left: 35rem;
width:100%;
height:auto;
min-height:100rem;
display: block;
.strip {
flex-direction: row;