1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Merge branch 'master' into dev

This commit is contained in:
Nick O'Leary 2021-05-14 21:18:32 +01:00
commit 6b43a23c4b
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 6 additions and 4 deletions

View File

@ -312,7 +312,8 @@
} }
if (child.depth !== parent.depth+1) { if (child.depth !== parent.depth+1) {
child.depth = parent.depth+1; child.depth = parent.depth+1;
var labelPaddingWidth = ((child.gutter ? child.gutter[0].offsetWidth + 2 : 0) + (child.depth * 20)); // var labelPaddingWidth = ((child.gutter ? child.gutter[0].offsetWidth + 2 : 0) + (child.depth * 20));
var labelPaddingWidth = ((child.gutter?child.gutter.width()+2:0)+(child.depth*20));
child.treeList.labelPadding.width(labelPaddingWidth+'px'); child.treeList.labelPadding.width(labelPaddingWidth+'px');
if (child.element) { if (child.element) {
$(child.element).css({ $(child.element).css({
@ -531,7 +532,8 @@
}).appendTo(label) }).appendTo(label)
} }
var labelPaddingWidth = (item.gutter ? item.gutter[0].offsetWidth + 2 : 0) + (depth * 20) var labelPaddingWidth = (item.gutter?item.gutter.width()+2:0)+(depth*20);
// var labelPaddingWidth = (item.gutter ? item.gutter[0].offsetWidth + 2 : 0) + (depth * 20)
item.treeList.labelPadding = $('<span>').css({ item.treeList.labelPadding = $('<span>').css({
display: "inline-block", display: "inline-block",
width: labelPaddingWidth+'px' width: labelPaddingWidth+'px'

View File

@ -366,7 +366,8 @@ module.exports = function(RED) {
__node__.error("Cannot send from close function"); __node__.error("Cannot send from close function");
} }
}; };
`+node.fin +`})();`; `+node.fin +`
})();`;
finOpt = createVMOpt(node, " cleanup"); finOpt = createVMOpt(node, " cleanup");
finScript = new vm.Script(finText, finOpt); finScript = new vm.Script(finText, finOpt);
} }
@ -489,4 +490,3 @@ module.exports = function(RED) {
}); });
RED.library.register("functions"); RED.library.register("functions");
}; };