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

fix SUBFLOW palette node update & SUBFLOW default color

This commit is contained in:
Hiroyasu Nishiyama 2019-07-31 22:59:29 +09:00
parent 260a9723a4
commit db65460ec0
2 changed files with 4 additions and 13 deletions

View File

@ -1117,7 +1117,7 @@ RED.editor = (function() {
if (node.type === "subflow") {
// subflow template can select its color
var color = node.color ? node.color : "#E9967A";
var color = node.color ? node.color : "#da9";
var colorRow = $("<div/>", {
class: "form-row"
}).appendTo(dialogForm);
@ -2309,7 +2309,6 @@ RED.editor = (function() {
changes.color = newColor;
changed = true;
RED.utils.clearNodeColorCache();
RED.palette.changeSubflowColor(editing_node, newColor);
}
var old_env = editing_node.env;

View File

@ -429,10 +429,9 @@ RED.palette = (function() {
currentCategoryNode.find("i").toggleClass("expanded");
}
}
}
paletteNode.css("backgroundColor", sf.color);
});
}
@ -593,12 +592,6 @@ RED.palette = (function() {
setTimeout(function() { $(window).trigger("resize"); } ,200);
}
function changeSubflowColor(sf, color) {
var paletteNode = getPaletteNode('subflow:'+sf.id);
paletteNode.css("backgroundColor", color);
}
function getCategories() {
var categories = [];
$("#red-ui-palette-container .red-ui-palette-category").each(function(i,d) {
@ -613,7 +606,6 @@ RED.palette = (function() {
hide:hideNodeType,
show:showNodeType,
refresh:refreshNodeTypes,
getCategories: getCategories,
changeSubflowColor: changeSubflowColor
getCategories: getCategories
};
})();