From 5198e70d1460134689c11f6bbbc6147b4292fb0b Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Thu, 15 Sep 2016 12:53:24 -0400 Subject: [PATCH] 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 --- .../src/main/webapp/js/nf/canvas/nf-actions.js | 2 -- .../src/main/webapp/js/nf/canvas/nf-connection.js | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js index 9f9c460c37..52e24aa394 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-actions.js @@ -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(); }); } } diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js index 4242c69e2d..a64dc3f083 100644 --- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js +++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-connection.js @@ -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. *