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

Prevent node creep when switching tabs

This commit is contained in:
Nick O'Leary 2020-06-16 20:23:18 +01:00
parent 714b3d3fe0
commit 4dd68452b4
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -3528,7 +3528,6 @@ RED.view = (function() {
var isLink = (d.type === "link in" || d.type === "link out")
var hideLabel = d.hasOwnProperty('l')?!d.l : isLink;
node.attr("id",d.id);
d.w = node_height;
d.h = node_height;
d.resize = true;
@ -3722,8 +3721,9 @@ RED.view = (function() {
} else {
d.w = Math.max(node_width,20*(Math.ceil((labelParts.width+50+(d._def.inputs>0?7:0))/20)) );
}
// d.w = Math.max(node_width,20*(Math.ceil((calculateTextWidth(l, "red-ui-flow-node-label", 50)+(d._def.inputs>0?7:0))/20)) );
d.x += (d.w-ow)/2;
if (ow !== undefined) {
d.x += (d.w-ow)/2;
}
d.resize = false;
}