mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge branch 'master' into dev
This commit is contained in:
commit
fe64c6a841
@ -86,6 +86,10 @@ RED.nodes = (function() {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addNodeSet: function(ns) {
|
addNodeSet: function(ns) {
|
||||||
|
if (!ns.types) {
|
||||||
|
// A node has been loaded without any types. Ignore it.
|
||||||
|
return;
|
||||||
|
}
|
||||||
ns.added = false;
|
ns.added = false;
|
||||||
nodeSets[ns.id] = ns;
|
nodeSets[ns.id] = ns;
|
||||||
for (var j=0;j<ns.types.length;j++) {
|
for (var j=0;j<ns.types.length;j++) {
|
||||||
|
@ -785,6 +785,9 @@ RED.tabs = (function() {
|
|||||||
count: function() {
|
count: function() {
|
||||||
return ul.find("li.red-ui-tab").length;
|
return ul.find("li.red-ui-tab").length;
|
||||||
},
|
},
|
||||||
|
activeIndex: function() {
|
||||||
|
return ul.find("li.active").index()
|
||||||
|
},
|
||||||
contains: function(id) {
|
contains: function(id) {
|
||||||
return ul.find("a[href='#"+id+"']").length > 0;
|
return ul.find("a[href='#"+id+"']").length > 0;
|
||||||
},
|
},
|
||||||
|
@ -882,6 +882,7 @@ RED.utils = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getDefaultNodeIcon(def,node) {
|
function getDefaultNodeIcon(def,node) {
|
||||||
|
def = def || {};
|
||||||
var icon_url;
|
var icon_url;
|
||||||
if (node && node.type === "subflow") {
|
if (node && node.type === "subflow") {
|
||||||
icon_url = "node-red/subflow.svg";
|
icon_url = "node-red/subflow.svg";
|
||||||
@ -919,6 +920,7 @@ RED.utils = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getNodeIcon(def,node) {
|
function getNodeIcon(def,node) {
|
||||||
|
def = def || {};
|
||||||
if (node && node.type === '_selection_') {
|
if (node && node.type === '_selection_') {
|
||||||
return "font-awesome/fa-object-ungroup";
|
return "font-awesome/fa-object-ungroup";
|
||||||
} else if (node && node.type === 'group') {
|
} else if (node && node.type === 'group') {
|
||||||
@ -1006,6 +1008,7 @@ RED.utils = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getNodeColor(type, def) {
|
function getNodeColor(type, def) {
|
||||||
|
def = def || {};
|
||||||
var result = def.color;
|
var result = def.color;
|
||||||
var paletteTheme = RED.settings.theme('palette.theme') || [];
|
var paletteTheme = RED.settings.theme('palette.theme') || [];
|
||||||
if (paletteTheme.length > 0) {
|
if (paletteTheme.length > 0) {
|
||||||
|
@ -493,7 +493,11 @@ RED.workspaces = (function() {
|
|||||||
if (!workspace_tabs.contains(id)) {
|
if (!workspace_tabs.contains(id)) {
|
||||||
var sf = RED.nodes.subflow(id);
|
var sf = RED.nodes.subflow(id);
|
||||||
if (sf) {
|
if (sf) {
|
||||||
addWorkspace({type:"subflow",id:id,icon:"red/images/subflow_tab.svg",label:sf.name, closeable: true});
|
addWorkspace(
|
||||||
|
{type:"subflow",id:id,icon:"red/images/subflow_tab.svg",label:sf.name, closeable: true},
|
||||||
|
null,
|
||||||
|
workspace_tabs.activeIndex()+1
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user