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

Remove name generation from link call and add to Function

This commit is contained in:
Nick O'Leary 2022-04-25 20:30:05 +01:00
parent 908f9562f6
commit 84e02fc144
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
3 changed files with 14 additions and 14 deletions

View File

@ -74,7 +74,7 @@
RED.nodes.registerType('debug',{
category: 'common',
defaults: {
name: {value:"_"},
name: {value:"_DEFAULT_"},
active: {value:true},
tosidebar: {value:true},
console: {value:false},
@ -546,7 +546,7 @@
$("#node-input-statusVal").val($("#node-input-typed-status").typedInput('value'));
},
onadd: function() {
if (this.name === '_') {
if (this.name === '_DEFAULT_') {
this.name = ''
RED.actions.invoke("core:generate-node-names", this)
}

View File

@ -218,7 +218,7 @@
}
function onAdd() {
if (this.name === '_') {
if (this.name === '_DEFAULT_') {
this.name = ''
RED.actions.invoke("core:generate-node-names", this)
}
@ -235,7 +235,7 @@
category: 'common',
color:"#ddd",//"#87D8CF",
defaults: {
name: { value: "_" },
name: { value: "_DEFAULT_" },
links: { value: [], type:"link out[]" }
},
inputs:0,
@ -271,7 +271,7 @@
category: 'common',
color:"#ddd",//"#87D8CF",
defaults: {
name: { value: "_" },
name: { value: "" },
links: { value: [], type:"link in[]" },
linkType: { value:"static" },
timeout: { value: "30", validate:RED.validators.number(true) }
@ -319,20 +319,14 @@
oneditsave: function() {
onEditSave(this);
},
oneditresize: resizeNodeList,
onadd: function() {
if (this.name === '_') {
this.name = ''
RED.actions.invoke("core:generate-node-names", this)
}
}
oneditresize: resizeNodeList
});
RED.nodes.registerType('link out',{
category: 'common',
color:"#ddd",//"#87D8CF",
defaults: {
name: { value:"_" },
name: { value:"_DEFAULT_" },
mode: { value: "link" },// link || return
links: { value: [], type:"link in[]" }
},

View File

@ -355,7 +355,7 @@
color:"#fdd0a2",
category: 'function',
defaults: {
name: {value:""},
name: {value:"_DEFAULT_"},
func: {value:"\nreturn msg;"},
outputs: {value:1},
noerr: {value:0,required:true,validate:function(v) { return !v; }},
@ -605,6 +605,12 @@
this.finalizeEditor.resize();
$("#node-input-libs-container").css("height", (height - 192)+"px");
},
onadd: function() {
if (this.name === '_DEFAULT_') {
this.name = ''
RED.actions.invoke("core:generate-node-names", this)
}
}
});
})();