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:
parent
260a9723a4
commit
db65460ec0
@ -1117,7 +1117,7 @@ RED.editor = (function() {
|
|||||||
|
|
||||||
if (node.type === "subflow") {
|
if (node.type === "subflow") {
|
||||||
// subflow template can select its color
|
// subflow template can select its color
|
||||||
var color = node.color ? node.color : "#E9967A";
|
var color = node.color ? node.color : "#da9";
|
||||||
var colorRow = $("<div/>", {
|
var colorRow = $("<div/>", {
|
||||||
class: "form-row"
|
class: "form-row"
|
||||||
}).appendTo(dialogForm);
|
}).appendTo(dialogForm);
|
||||||
@ -2309,7 +2309,6 @@ RED.editor = (function() {
|
|||||||
changes.color = newColor;
|
changes.color = newColor;
|
||||||
changed = true;
|
changed = true;
|
||||||
RED.utils.clearNodeColorCache();
|
RED.utils.clearNodeColorCache();
|
||||||
RED.palette.changeSubflowColor(editing_node, newColor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var old_env = editing_node.env;
|
var old_env = editing_node.env;
|
||||||
|
@ -429,10 +429,9 @@ RED.palette = (function() {
|
|||||||
currentCategoryNode.find("i").toggleClass("expanded");
|
currentCategoryNode.find("i").toggleClass("expanded");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
paletteNode.css("backgroundColor", sf.color);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,12 +592,6 @@ RED.palette = (function() {
|
|||||||
setTimeout(function() { $(window).trigger("resize"); } ,200);
|
setTimeout(function() { $(window).trigger("resize"); } ,200);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeSubflowColor(sf, color) {
|
|
||||||
var paletteNode = getPaletteNode('subflow:'+sf.id);
|
|
||||||
paletteNode.css("backgroundColor", color);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function getCategories() {
|
function getCategories() {
|
||||||
var categories = [];
|
var categories = [];
|
||||||
$("#red-ui-palette-container .red-ui-palette-category").each(function(i,d) {
|
$("#red-ui-palette-container .red-ui-palette-category").each(function(i,d) {
|
||||||
@ -613,7 +606,6 @@ RED.palette = (function() {
|
|||||||
hide:hideNodeType,
|
hide:hideNodeType,
|
||||||
show:showNodeType,
|
show:showNodeType,
|
||||||
refresh:refreshNodeTypes,
|
refresh:refreshNodeTypes,
|
||||||
getCategories: getCategories,
|
getCategories: getCategories
|
||||||
changeSubflowColor: changeSubflowColor
|
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
Loading…
Reference in New Issue
Block a user