Minimise amount of node redrawing done during drag

This commit is contained in:
Nick O'Leary 2015-06-03 10:05:31 +01:00
parent 871f764e98
commit e2fa457ca2
1 changed files with 143 additions and 139 deletions

View File

@ -1388,6 +1388,8 @@ RED.view = (function() {
var thisNode = d3.select(this);
//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) + ")"; });
if (mouse_mode != RED.state.MOVING_ACTIVE) {
thisNode.selectAll(".node")
.attr("width",function(d){return d.w})
.attr("height",function(d){return d.h})
@ -1536,6 +1538,8 @@ RED.view = (function() {
}
return "";
});
}
if (!showStatus || !d.status) {
thisNode.selectAll('.node_status_group').style("display","none");
} else {