size/position can't be negative.

style changes: panel scrollbar, edited widget's drag handles
This commit is contained in:
jean-emmanuel 2016-02-14 14:14:59 +01:00
parent d81c5e3ae5
commit cc3fa04bad
3 changed files with 14 additions and 12 deletions

File diff suppressed because one or more lines are too long

View file

@ -103,16 +103,18 @@ parsewidgets = function(widgets,parent) {
widgetData[k] = tmp
}
// if (parent[0].className.match(/strip|panel/)) {
// delete widgetData.top
// delete widgetData.left
// }
for (t in {width:'',height:'',top:'',left:''}) {
widgetData[t] = `${widgetData[t]}`.indexOf('-')!=-1?0:widgetData[t]
}
var width = parseInt(widgetData.width)==widgetData.width?parseInt(widgetData.width)+'rem' : widgetData.width,
height = parseInt(widgetData.height)==widgetData.height?parseInt(widgetData.height)+'rem' : widgetData.height,
left = parseInt(widgetData.left)==widgetData.left?parseInt(widgetData.left)+'rem' : widgetData.left,
top = parseInt(widgetData.top)==widgetData.top?parseInt(widgetData.top)+'rem' : widgetData.top,
styleW = widgetData.width&&widgetData.width!='auto'?`width:${width};min-width:${width};`:'',
top = parseInt(widgetData.top)==widgetData.top?parseInt(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};`:'',
styleL = widgetData.left&&widgetData.left!='auto'||widgetData.left==0?`left:${left};`:'',
styleT = widgetData.top&&widgetData.top!='auto'||widgetData.top==0?`top:${top};`:''

View file

@ -709,8 +709,7 @@ a {
cursor: -webkit-grab;
width:15rem;
height:15rem;
border-radius: 15rem;
background: rgba($color-accent,.5);
border:2rem solid $color-accent;
&:active {
cursor:-webkit-grabbing
}
@ -799,6 +798,10 @@ a {
position: absolute;
border:$gutter solid transparent;
z-index: 2;
::-webkit-scrollbar-thumb, ::-webkit-scrollbar-track-piece {
border: 1rem solid $color-bg;
}
.panel {
height:100%;
overflow: auto;
@ -815,9 +818,6 @@ a {
width:100%;
}
}
&::-webkit-scrollbar-thumb, &::-webkit-scrollbar-track-piece {
border: 1rem solid $color-bg;
}
}
.navigation {
border-top: 0;