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,13 +3237,24 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
thisNode.selectAll(".red-ui-flow-node-changed")
|
if (vertical) {
|
||||||
.attr("transform",function(d){return "translate("+(d.w-10)+", -2)"})
|
thisNode.selectAll(".red-ui-flow-node-changed")
|
||||||
.classed("hide",function(d) { return !(d.changed||d.moved); });
|
.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); });
|
||||||
|
|
||||||
|
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-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) {
|
thisNode.selectAll(".red-ui-flow-port-input").each(function(d,i) {
|
||||||
var port = d3.select(this);
|
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
|
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(".red-ui-flow-node-status").style("display","none");
|
thisNode.selectAll(".red-ui-flow-node-status").style("display","none");
|
||||||
thisNode.selectAll(".red-ui-flow-node-status-group").attr("transform","translate(-14,"+(d.h+3)+")");
|
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 {
|
} else {
|
||||||
thisNode.selectAll(".red-ui-flow-node-status-group").attr("transform","translate(3,"+(d.h+3)+")");
|
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;
|
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);
|
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