Skip to content

Commit 5c8dc80

Browse files
author
Dave Conway-Jones
committed
fix ui_from two column css spacing
1 parent 2c6962d commit 5c8dc80

File tree

5 files changed

+14
-13
lines changed

5 files changed

+14
-13
lines changed

dist/css/app.min.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32578,8 +32578,8 @@ reason: https://github.com/angular/material/issues/6214
3257832578
.nr-dashboard-form .formlabel {
3257932579
font-size: large;
3258032580
font-weight: 500;
32581-
margin-top: 8px;
32582-
margin-bottom: 20px;
32581+
margin-top: 12px;
32582+
margin-bottom: 6px;
3258332583
padding: 0 6px;
3258432584
width: 100%;
3258532585
}

dist/dashboard.appcache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
CACHE MANIFEST
2-
# Time: Sat Feb 13 2021 16:18:11 GMT+0000 (Greenwich Mean Time)
2+
# Time: Sun Feb 14 2021 17:51:42 GMT+0000 (Greenwich Mean Time)
33

44
CACHE:
55
i18n.js
@@ -26,4 +26,4 @@ loading.html
2626
NETWORK:
2727
*
2828

29-
# hash: 9686ac8800bb9d75c8fd13d24177ef0ffbd4fe243ad959e5490d0d0864e6ec1f
29+
# hash: ed72d01c8f17d990eb4b9e4a671f0a55a599caa92ab67f54db486de0aa2cf8db

nodes/ui_base.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -701,12 +701,13 @@
701701
} else if (redNode.type === 'ui_chart') {
702702
height = Math.floor(groupWidth/2)+1;
703703
} else if (redNode.type === 'ui_form') {
704-
var optNum = redNode.options.length; // Sub widget number
705-
if (redNode.label) {
706-
height = optNum + 2; // Label and Button
707-
} else {
708-
height = optNum + 1; // Button only
709-
}
704+
// var optNum = redNode.options.length; // Sub widget number
705+
// if (redNode.label) {
706+
// height = optNum + 2; // Label and Button
707+
// } else {
708+
// height = optNum + 1; // Button only
709+
// }
710+
height = redNode.rowCount
710711
} else if (redNode.type === 'ui_lineargauge') {
711712
if (redNode.unit && redNode.name) {
712713
height = 5;

nodes/ui_form.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = function(RED) {
2424
order: config.order,
2525
value: config.payload || node.id,
2626
width: config.width || group.config.width || 6,
27-
height: config.height || config.options.length ,
27+
height: config.height || config.splitLayout == true ? Math.ceil(config.options.length/2) : config.options.length,
2828
options: config.options,
2929
formValue: config.formValue,
3030
submit: config.submit,

src/components/ui-component/templates/form.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
.nr-dashboard-form .formlabel {
1515
font-size: large;
1616
font-weight: 500;
17-
margin-top: 8px;
18-
margin-bottom: 20px;
17+
margin-top: 12px;
18+
margin-bottom: 6px;
1919
padding: 0 6px;
2020
width: 100%;
2121
}

0 commit comments

Comments
 (0)