mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
fix position of status text, change & error mark
This commit is contained in:
parent
69d5ffe1ed
commit
22dd2cd084
@ -3237,6 +3237,15 @@ RED.view = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
if (vertical) {
|
||||
thisNode.selectAll(".red-ui-flow-node-changed")
|
||||
.attr("transform",function(d){return "translate("+(d.w-2)+", -2)"})
|
||||
.classed("hide",function(d) { return !(d.changed||d.moved); });
|
||||
|
||||
thisNode.selectAll(".red-ui-flow-node-error")
|
||||
.attr("transform",function(d){ return "translate("+(d.w-2-((d.changed||d.moved)?14:0))+", -2)"})
|
||||
.classed("hide",function(d) { return d.valid; });
|
||||
} else {
|
||||
thisNode.selectAll(".red-ui-flow-node-changed")
|
||||
.attr("transform",function(d){return "translate("+(d.w-10)+", -2)"})
|
||||
.classed("hide",function(d) { return !(d.changed||d.moved); });
|
||||
@ -3244,6 +3253,8 @@ RED.view = (function() {
|
||||
thisNode.selectAll(".red-ui-flow-node-error")
|
||||
.attr("transform",function(d){ return "translate("+(d.w-10-((d.changed||d.moved)?14:0))+", -2)"})
|
||||
.classed("hide",function(d) { return d.valid; });
|
||||
}
|
||||
|
||||
|
||||
thisNode.selectAll(".red-ui-flow-port-input").each(function(d,i) {
|
||||
var port = d3.select(this);
|
||||
@ -3316,9 +3327,17 @@ RED.view = (function() {
|
||||
var fill = status_colours[d.status.fill]; // Only allow our colours for now
|
||||
if (d.status.shape == null && fill == null) {
|
||||
thisNode.selectAll(".red-ui-flow-node-status").style("display","none");
|
||||
if (vertical) {
|
||||
thisNode.selectAll(".red-ui-flow-node-status-group").attr("transform","translate(" + (-14+d.w/2) + ","+(d.h+3)+")");
|
||||
} else {
|
||||
thisNode.selectAll(".red-ui-flow-node-status-group").attr("transform","translate(-14,"+(d.h+3)+")");
|
||||
}
|
||||
} else {
|
||||
if (vertical) {
|
||||
thisNode.selectAll(".red-ui-flow-node-status-group").attr("transform","translate(" + (3 + d.w/2) + ","+(d.h+3)+")");
|
||||
} else {
|
||||
thisNode.selectAll(".red-ui-flow-node-status-group").attr("transform","translate(3,"+(d.h+3)+")");
|
||||
}
|
||||
var statusClass = "red-ui-flow-node-status-"+(d.status.shape||"dot")+"-"+d.status.fill;
|
||||
thisNode.selectAll(".red-ui-flow-node-status").style("display","inline").attr("class","red-ui-flow-node-status "+statusClass);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user