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 isLink = (d.type === "link in" || d.type === "link out")
var hideLabel = d.hasOwnProperty('l')?!d.l : isLink; var hideLabel = d.hasOwnProperty('l')?!d.l : isLink;
node.attr("id",d.id); node.attr("id",d.id);
d.w = node_height;
d.h = node_height; d.h = node_height;
d.resize = true; d.resize = true;
@ -3722,8 +3721,9 @@ RED.view = (function() {
} else { } 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((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)) ); if (ow !== undefined) {
d.x += (d.w-ow)/2; d.x += (d.w-ow)/2;
}
d.resize = false; d.resize = false;
} }