mirror of https://github.com/node-red/node-red.git
parent
6f3ec089db
commit
3f8dbeed8f
|
|
@ -1331,9 +1331,13 @@ RED.utils = (function() {
|
|||
|
||||
function getNodeColor(type, def) {
|
||||
def = def || {};
|
||||
if (type === 'subflow') {
|
||||
// Allow a subflow instance colour to take precedence over theme if not the default color
|
||||
if (/^subflow($|:)/.test(type) && def.hasOwnProperty('color') && def.color !== "#DDAA99") {
|
||||
return def.color
|
||||
}
|
||||
if (type === 'subflow') {
|
||||
type = def.type
|
||||
}
|
||||
if (!nodeColorCache.hasOwnProperty(type)) {
|
||||
const paletteTheme = RED.settings.theme('palette.theme') || [];
|
||||
if (paletteTheme.length > 0) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue