mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Improve red-ui-node-icon css and add red-ui-node-icon-small modifier class
This commit is contained in:
@@ -1133,6 +1133,8 @@ RED.utils = (function() {
|
||||
}
|
||||
|
||||
function createNodeIcon(node, includeLabel) {
|
||||
var container = $('<span class="red-ui-node-icon-container">');
|
||||
|
||||
var def = node._def;
|
||||
var nodeDiv = $('<div>',{class:"red-ui-node-icon"})
|
||||
if (node.type === "_selection_") {
|
||||
@@ -1156,9 +1158,9 @@ RED.utils = (function() {
|
||||
var icon_url = RED.utils.getNodeIcon(def,node);
|
||||
RED.utils.createIconElement(icon_url, nodeDiv, true);
|
||||
|
||||
nodeDiv.appendTo(container);
|
||||
|
||||
if (includeLabel) {
|
||||
var container = $('<span>');
|
||||
nodeDiv.appendTo(container);
|
||||
var labelText = RED.utils.getNodeLabel(node,node.name || (node.type+": "+node.id));
|
||||
var label = $('<div>',{class:"red-ui-node-label"}).appendTo(container);
|
||||
if (labelText) {
|
||||
@@ -1166,9 +1168,8 @@ RED.utils = (function() {
|
||||
} else {
|
||||
label.html(" ")
|
||||
}
|
||||
return container;
|
||||
}
|
||||
return nodeDiv;
|
||||
return container;
|
||||
}
|
||||
|
||||
function getDarkerColor(c) {
|
||||
|
Reference in New Issue
Block a user