mirror of
https://github.com/node-red/node-red
synced 2024-11-21 23:48:30 +00:00
Do not include Junction type in quick-add for virtual links
This commit is contained in:
parent
380d3be819
commit
89839f433b
@ -335,13 +335,25 @@ RED.typeSearch = (function() {
|
||||
}
|
||||
}
|
||||
function applyFilter(filter,type,def) {
|
||||
return !def || !filter ||
|
||||
(
|
||||
(!filter.spliceMultiple) &&
|
||||
(!filter.type || type === filter.type) &&
|
||||
(!filter.input || type === 'junction' || def.inputs > 0) &&
|
||||
(!filter.output || type === 'junction' || def.outputs > 0)
|
||||
)
|
||||
if (!filter) {
|
||||
// No filter; allow everything
|
||||
return true
|
||||
}
|
||||
if (type === 'junction') {
|
||||
// Only allow Junction is there's no specific type filter
|
||||
return !filter.type
|
||||
}
|
||||
if (filter.type) {
|
||||
// Handle explicit type filter
|
||||
return filter.type === type
|
||||
}
|
||||
if (!def) {
|
||||
// No node definition available - allow it
|
||||
return true
|
||||
}
|
||||
// Check if the filter is for input/outputs and apply
|
||||
return (!filter.input || def.inputs > 0) &&
|
||||
(!filter.output || def.outputs > 0)
|
||||
}
|
||||
function refreshTypeList(opts) {
|
||||
var i;
|
||||
|
Loading…
Reference in New Issue
Block a user