mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Modify RED.panels to use flexbox position
This commit is contained in:
parent
73dde4de51
commit
aca61c0354
@ -52,11 +52,11 @@ RED.panels = (function() {
|
||||
var newSizes = [panelSizes[0]+delta,panelSizes[1]-delta];
|
||||
if (vertical) {
|
||||
$(children[0]).height(newSizes[0]);
|
||||
$(children[1]).height(newSizes[1]);
|
||||
// $(children[1]).height(newSizes[1]);
|
||||
ui.position.top -= delta;
|
||||
} else {
|
||||
$(children[0]).width(newSizes[0]);
|
||||
$(children[1]).width(newSizes[1]);
|
||||
// $(children[1]).width(newSizes[1]);
|
||||
ui.position.left -= delta;
|
||||
}
|
||||
if (options.resize) {
|
||||
@ -99,10 +99,10 @@ RED.panels = (function() {
|
||||
panelSizes = [topPanelSize,bottomPanelSize];
|
||||
if (vertical) {
|
||||
$(children[0]).outerHeight(panelSizes[0]);
|
||||
$(children[1]).outerHeight(panelSizes[1]);
|
||||
// $(children[1]).outerHeight(panelSizes[1]);
|
||||
} else {
|
||||
$(children[0]).outerWidth(panelSizes[0]);
|
||||
$(children[1]).outerWidth(panelSizes[1]);
|
||||
// $(children[1]).outerWidth(panelSizes[1]);
|
||||
}
|
||||
}
|
||||
if (options.resize) {
|
||||
|
@ -22,9 +22,19 @@
|
||||
// border: 1px solid red;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
>.red-ui-panel:first-child {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
>.red-ui-panel:last-child {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.red-ui-panels-separator {
|
||||
flex: 0 0 auto;
|
||||
border-top: 1px solid $secondary-border-color;
|
||||
border-bottom: 1px solid $secondary-border-color;
|
||||
height: 7px;
|
||||
@ -41,6 +51,8 @@
|
||||
|
||||
.red-ui-panels.red-ui-panels-horizontal {
|
||||
height: 100%;
|
||||
flex-direction: row;
|
||||
|
||||
&>.red-ui-panel {
|
||||
vertical-align: top;
|
||||
display: inline-block;
|
||||
|
Loading…
Reference in New Issue
Block a user