panel "noscroll" option and text "vertical" option, + some style clean
This commit is contained in:
parent
cbbe42d038
commit
d76786baf5
9 changed files with 38 additions and 23 deletions
File diff suppressed because one or more lines are too long
|
|
@ -9,7 +9,7 @@ module.exports.options = {
|
|||
top:'auto',
|
||||
width:'auto',
|
||||
height:'auto',
|
||||
stretch:false,
|
||||
scroll:true,
|
||||
color:'auto',
|
||||
css:'',
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ module.exports.create = function(widgetData,container) {
|
|||
</div>
|
||||
`)
|
||||
|
||||
if (widgetData.stretch) widget.addClass('stretch')
|
||||
if (!widgetData.scroll) widget.addClass('noscroll')
|
||||
|
||||
if (widgetData.tabs.length) {
|
||||
parsetabs(widgetData.tabs,widget)
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ module.exports.options = {
|
|||
top:'auto',
|
||||
width:'auto',
|
||||
height:'auto',
|
||||
vertical:false,
|
||||
color:'auto',
|
||||
css:'',
|
||||
|
||||
|
|
@ -28,6 +29,8 @@ module.exports.create = function(widgetData,container) {
|
|||
label = widgetData.label===false?widgetData.id:widgetData.label=='auto'?widgetData.id:widgetData.label=='auto'
|
||||
|
||||
|
||||
if (widgetData.vertical) widget.addClass('vertical')
|
||||
|
||||
widget.setValue = function(v,send,sync){
|
||||
widget.text(v)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,8 +116,8 @@
|
|||
pointer-events: none;
|
||||
}
|
||||
.widget.editing:after {
|
||||
right:-1rem;
|
||||
bottom:-1rem;
|
||||
// right:-1rem;
|
||||
// bottom:-1rem;
|
||||
}
|
||||
|
||||
.context-menu {
|
||||
|
|
|
|||
|
|
@ -5,15 +5,22 @@
|
|||
z-index: 2;
|
||||
width: 200rem;
|
||||
height: 200rem;
|
||||
border:0;
|
||||
|
||||
background: var(--color-faded);
|
||||
|
||||
&.label {
|
||||
&:before {
|
||||
content:"";
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
right:0;
|
||||
width:auto;
|
||||
bottom:0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
border-bottom: 1rem solid var(--color-bg);
|
||||
border-right: 1rem solid var(--color-bg);
|
||||
pointer-events: none;
|
||||
z-index: 2;
|
||||
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb, ::-webkit-scrollbar-track-piece {
|
||||
|
|
@ -21,34 +28,32 @@
|
|||
}
|
||||
|
||||
&.nolabel .panel {
|
||||
top:1rem;
|
||||
top:0;
|
||||
}
|
||||
|
||||
.panel {
|
||||
overflow: auto;
|
||||
position: absolute;
|
||||
top:35rem;
|
||||
left:1rem;
|
||||
right:1rem;
|
||||
bottom:1rem;
|
||||
background: var(--color-bg);
|
||||
left:0;
|
||||
right:0;
|
||||
bottom:0;
|
||||
z-index: 1;
|
||||
|
||||
&.has-tabs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--color-bg);
|
||||
}
|
||||
|
||||
&.stretch {
|
||||
display:flex;
|
||||
justify-content: space-between;
|
||||
&.noscroll {
|
||||
overflow: hidden;
|
||||
> .widget {
|
||||
width:100%;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
> .navigation:before {
|
||||
display:none;
|
||||
}
|
||||
|
||||
}
|
||||
.navigation {
|
||||
border-top: 0;
|
||||
|
|
|
|||
|
|
@ -93,5 +93,11 @@
|
|||
align-items: center;
|
||||
background: var(--color-faded);
|
||||
color:var(--color-accent);
|
||||
&.vertical {
|
||||
transform: rotate(180deg);
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
-webkit-writing-mode:vertical-lr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
width:100rem;
|
||||
height:100%;
|
||||
overflow: visible;
|
||||
background: var(--color-bg);
|
||||
// background: var(--color-bg);
|
||||
|
||||
> .strip {
|
||||
height: 100%;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Panels can contains tabs or widgets. These can be absolutely positioned and can
|
|||
|
||||
```js
|
||||
type:'panel',
|
||||
stretch:false, // [bool] set to true to stretch widgets width (don't put horizontal strips in it)
|
||||
scroll:true, // [bool] set to false to disable scrollbars
|
||||
widgets: [], // [array] of widget objects
|
||||
tabs: [] // [array] of tab objects
|
||||
```
|
||||
|
|
|
|||
|
|
@ -45,4 +45,5 @@ logScale: false, // [bool] use logarithmic scale for Y axis (log10)
|
|||
## text
|
||||
```js
|
||||
type:'text',
|
||||
vertical:false, // [bool]
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue