Fix label state for link nodes when dropped into the ws

pull/5091/head
GogoVega 2025-03-25 13:18:11 +01:00
parent 23c44db30d
commit d14ce7d6d4
No known key found for this signature in database
GPG Key ID: E1E048B63AC5AC2B
1 changed files with 6 additions and 2 deletions

View File

@ -655,8 +655,12 @@ RED.view = (function() {
var nn = RED.nodes.add(result.node);
var showLabel = RED.utils.getMessageProperty(RED.settings.get('editor'),"view.view-node-show-label");
if (showLabel !== undefined && (nn._def.hasOwnProperty("showLabel")?nn._def.showLabel:true) && !nn._def.defaults.hasOwnProperty("l")) {
nn.l = showLabel;
if (showLabel !== undefined && !nn._def.defaults.hasOwnProperty("l")) {
if (nn._def.hasOwnProperty("showLabel")) {
nn.l = nn._def.showLabel;
} else {
nn.l = showLabel;
}
}
var helperOffset = d3.touches(ui.helper.get(0))[0]||d3.mouse(ui.helper.get(0));