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

Shift status text left if no shape specified

This commit is contained in:
Dave Conway-Jones 2019-02-13 14:36:36 +00:00
parent 419f26db87
commit 2937b25d6d
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -3008,11 +3008,12 @@ RED.view = (function() {
if (!showStatus || !d.status) { if (!showStatus || !d.status) {
thisNode.selectAll(".node_status_group").style("display","none"); thisNode.selectAll(".node_status_group").style("display","none");
} else { } else {
thisNode.selectAll(".node_status_group").style("display","inline").attr("transform","translate(3,"+(d.h+3)+")");
var fill = status_colours[d.status.fill]; // Only allow our colours for now var fill = status_colours[d.status.fill]; // Only allow our colours for now
if (d.status.shape == null && fill == null) { if (d.status.shape == null && fill == null) {
thisNode.selectAll(".node_status").style("display","none"); thisNode.selectAll(".node_status").style("display","none");
thisNode.selectAll(".node_status_group").style("display","inline").attr("transform","translate(-14,"+(d.h+3)+")");
} else { } else {
thisNode.selectAll(".node_status_group").style("display","inline").attr("transform","translate(3,"+(d.h+3)+")");
var style; var style;
if (d.status.shape == null || d.status.shape == "dot") { if (d.status.shape == null || d.status.shape == "dot") {
style = { style = {