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:
parent
714b3d3fe0
commit
4dd68452b4
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user