NIFI-2707: - Ensuring that connections are always sorted accordingly to their zIndex. This preserves the 'bring to front' settings.

This closes #1023.

Signed-off-by: Bryan Bende <bbende@apache.org>
This commit is contained in:
Matt Gilman 2016-09-15 12:53:24 -04:00 committed by Bryan Bende
parent b304f70f3e
commit 5198e70d14
No known key found for this signature in database
GPG Key ID: A0DDA9ED50711C39
2 changed files with 2 additions and 11 deletions

View File

@ -1450,9 +1450,7 @@ nf.Actions = (function () {
dataType: 'json',
contentType: 'application/json'
}).done(function (response) {
// update the edge's zIndex
nf.Connection.set(response);
nf.Connection.reorder();
});
}
}

View File

@ -1579,7 +1579,7 @@ nf.Connection = (function () {
selection.call(updateConnections, {
'updatePath': true,
'updateLabel': false
});
}).call(sort);
},
/**
@ -1634,17 +1634,10 @@ nf.Connection = (function () {
'updatePath': true,
'updateLabel': true,
'transition': transition
});
}).call(sort);
selection.exit().call(removeConnections);
},
/**
* Reorders the connections based on their current z index.
*/
reorder: function () {
d3.selectAll('g.connection').call(sort);
},
/**
* Refreshes the connection in the UI.
*