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

Add condition to handle existing node

This commit is contained in:
Kazuhito Yokoi 2019-03-05 21:28:08 +09:00
parent 66fc4b536c
commit f80b172022

View File

@ -186,7 +186,7 @@ RED.palette = (function() {
var icon_url = RED.utils.getNodeIcon(def); var icon_url = RED.utils.getNodeIcon(def);
var iconContainer = $('<div/>', { var iconContainer = $('<div/>', {
class: "palette_icon_container" class: "palette_icon_container"
+ (((def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " palette_icon_container_right" : "") + (((!def.align && def.inputs !== 0 && def.outputs === 0) || "right" === def.align) ? " palette_icon_container_right" : "")
}).appendTo(d); }).appendTo(d);
RED.utils.createIconElement(icon_url, iconContainer, true); RED.utils.createIconElement(icon_url, iconContainer, true);
} }