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

Handle unknown nodes with no icon

This commit is contained in:
Nick O'Leary 2020-06-16 20:34:45 +01:00
parent 4dd68452b4
commit 9ce5210c33
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -3773,9 +3773,10 @@ RED.view = (function() {
var yp = d.h / 2 - (this.__labelLineCount__ / 2) * 24 + 13; var yp = d.h / 2 - (this.__labelLineCount__ / 2) * 24 + 13;
if ((!d._def.align && d.inputs !== 0 && d.outputs === 0) || "right" === d._def.align) { if ((!d._def.align && d.inputs !== 0 && d.outputs === 0) || "right" === d._def.align) {
if (this.__iconGroup__) {
this.__iconGroup__.classList.add("red-ui-flow-node-icon-group-right"); this.__iconGroup__.classList.add("red-ui-flow-node-icon-group-right");
this.__iconGroup__.setAttribute("transform", "translate("+(d.w-30)+",0)"); this.__iconGroup__.setAttribute("transform", "translate("+(d.w-30)+",0)");
}
this.__textGroup__.classList.add("red-ui-flow-node-label-right"); this.__textGroup__.classList.add("red-ui-flow-node-label-right");
this.__textGroup__.setAttribute("transform", "translate("+(d.w-38)+","+yp+")"); this.__textGroup__.setAttribute("transform", "translate("+(d.w-38)+","+yp+")");
} else { } else {