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

Move node state icons to left edge

This commit is contained in:
Nick O'Leary 2019-11-22 20:51:06 +00:00
parent 4a6941a0d2
commit 5d5a112c2b
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -3006,7 +3006,7 @@ RED.view = (function() {
.attr("class","red-ui-flow-node-status-label") .attr("class","red-ui-flow-node-status-label")
.attr("x",20).attr("y",10); .attr("x",20).attr("y",10);
node.append("g").attr("class","red-ui-flow-node-changed hide").attr("transform","translate(20, -2)").append("circle").attr("r",5); node.append("g").attr("class","red-ui-flow-node-changed hide").attr("transform","translate(20, -2)").append("circle").attr("r",4);
var nodeErrorButton = node.append("g").attr("class","red-ui-flow-node-error hide").attr("transform","translate(0, -2)").append("path").attr("d","M -5,4 l 10,0 -5,-8 z"); var nodeErrorButton = node.append("g").attr("class","red-ui-flow-node-error hide").attr("transform","translate(0, -2)").append("path").attr("d","M -5,4 l 10,0 -5,-8 z");
nodeErrorButton.on("mouseenter", function() { nodeErrorButton.on("mouseenter", function() {
if (d.validationErrors && d.validationErrors.length > 0) { if (d.validationErrors && d.validationErrors.length > 0) {
@ -3221,11 +3221,11 @@ RED.view = (function() {
if (vertical) { if (vertical) {
thisNode.selectAll(".red-ui-flow-node-changed") thisNode.selectAll(".red-ui-flow-node-changed")
.attr("transform",function(d){return "translate("+(0)+", -2)"}) .attr("transform",function(d){return "translate(0, 4)"})
.classed("hide",function(d) { return !(d.changed||d.moved); }); .classed("hide",function(d) { return !(d.changed||d.moved); });
thisNode.selectAll(".red-ui-flow-node-error") thisNode.selectAll(".red-ui-flow-node-error")
.attr("transform",function(d){ return "translate("+((d.changed||d.moved)?12:0)+", -2)"}) .attr("transform",function(d){ return "translate( 0,"+((d.changed||d.moved)?16:4)+")"})
.classed("hide",function(d) { return d.valid; }); .classed("hide",function(d) { return d.valid; });
} else { } else {
thisNode.selectAll(".red-ui-flow-node-changed") thisNode.selectAll(".red-ui-flow-node-changed")