You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sc...@apache.org on 2018/05/16 15:12:56 UTC

nifi git commit: NIFI-5173: - Removing unnecessary logic in the zoom handler since the zoom event is no longer triggered during onClick.

Repository: nifi
Updated Branches:
  refs/heads/master de1ad3eb6 -> c3059939e


NIFI-5173:
- Removing unnecessary logic in the zoom handler since the zoom event is no longer triggered during onClick.

This closes #2692

Signed-off-by: Scott Aslan <sc...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/c3059939
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/c3059939
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/c3059939

Branch: refs/heads/master
Commit: c3059939e8dc39f26394cc88e608dca7de3f8e1f
Parents: de1ad3e
Author: Matt Gilman <ma...@gmail.com>
Authored: Wed May 9 12:07:07 2018 -0400
Committer: Scott Aslan <sc...@gmail.com>
Committed: Wed May 16 11:12:16 2018 -0400

----------------------------------------------------------------------
 .../src/main/webapp/js/nf/canvas/nf-canvas.js            | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/c3059939/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 4ef2f2c..1afcae5 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -972,7 +972,6 @@
                 init: function () {
                     var refreshed;
 
-                    var zoomed = false;
                     var panning = false;
 
                     // filters zoom events as programmatically modifying the translate or scale now triggers the handlers
@@ -1022,13 +1021,8 @@
                                 k = d3.event.transform.k;
                             }
 
-                            // if we have zoomed, indicate that we are panning
-                            // to prevent deselection elsewhere
-                            if (zoomed) {
-                                panning = true;
-                            } else {
-                                zoomed = true;
-                            }
+                            // indicate that we are panning to prevent deselection in zoom.end below
+                            panning = true;
 
                             // refresh the canvas
                             refreshed = nfCanvas.View.refresh({
@@ -1069,7 +1063,6 @@
                             }
 
                             panning = false;
-                            zoomed = false;
                         });
 
                     // add the behavior to the canvas and disable dbl click zoom