mirror of https://github.com/node-red/node-red.git
Merge pull request #4518 from kazuhitoyokoi/master-fixquickadddialog4sf
Fix subflow ports in Quick Add dialogpull/3505/merge
commit
1ad4fe44e2
|
@ -186,8 +186,15 @@ RED.typeSearch = (function() {
|
||||||
var iconContainer = $('<div/>',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
|
var iconContainer = $('<div/>',{class:"red-ui-palette-icon-container"}).appendTo(nodeDiv);
|
||||||
RED.utils.createIconElement(icon_url, iconContainer, false);
|
RED.utils.createIconElement(icon_url, iconContainer, false);
|
||||||
|
|
||||||
|
if (/^subflow:/.test(object.type)) {
|
||||||
if (!/^_action_:/.test(object.type) && object.type !== "junction") {
|
var sf = RED.nodes.subflow(object.type.substring(8));
|
||||||
|
if (sf.in.length > 0) {
|
||||||
|
$('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
|
||||||
|
}
|
||||||
|
if (sf.out.length > 0) {
|
||||||
|
$('<div/>',{class:"red-ui-search-result-node-port red-ui-search-result-node-output"}).appendTo(nodeDiv);
|
||||||
|
}
|
||||||
|
} else if (!/^_action_:/.test(object.type) && object.type !== "junction") {
|
||||||
if (def.inputs > 0) {
|
if (def.inputs > 0) {
|
||||||
$('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
|
$('<div/>',{class:"red-ui-search-result-node-port"}).appendTo(nodeDiv);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue