mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Minimise amount of node redrawing done during drag
This commit is contained in:
parent
871f764e98
commit
e2fa457ca2
@ -1388,6 +1388,8 @@ RED.view = (function() {
|
|||||||
var thisNode = d3.select(this);
|
var thisNode = d3.select(this);
|
||||||
//thisNode.selectAll(".centerDot").attr({"cx":function(d) { return d.w/2;},"cy":function(d){return d.h/2}});
|
//thisNode.selectAll(".centerDot").attr({"cx":function(d) { return d.w/2;},"cy":function(d){return d.h/2}});
|
||||||
thisNode.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; });
|
thisNode.attr("transform", function(d) { return "translate(" + (d.x-d.w/2) + "," + (d.y-d.h/2) + ")"; });
|
||||||
|
|
||||||
|
if (mouse_mode != RED.state.MOVING_ACTIVE) {
|
||||||
thisNode.selectAll(".node")
|
thisNode.selectAll(".node")
|
||||||
.attr("width",function(d){return d.w})
|
.attr("width",function(d){return d.w})
|
||||||
.attr("height",function(d){return d.h})
|
.attr("height",function(d){return d.h})
|
||||||
@ -1536,6 +1538,8 @@ RED.view = (function() {
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user