You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by mc...@apache.org on 2015/01/12 16:27:36 UTC
incubator-nifi git commit: NIFI-214: - It appears that the zoom (pan)
event is being triggered early on some browser/OS combinations. As a result,
a pan of 0px is registering and throwing off deselection (since we want to
maintain selection when panning)
Repository: incubator-nifi
Updated Branches:
refs/heads/develop 5fbee2605 -> 1da5339a2
NIFI-214:
- It appears that the zoom (pan) event is being triggered early on some browser/OS combinations. As a result, a pan of 0px is registering and throwing off deselection (since we want to maintain selection when panning). I am not sure why the events are firing sporadically, but delaying when the panning flag is set seems to have addressed the deselection concerns.
Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/1da5339a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/1da5339a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/1da5339a
Branch: refs/heads/develop
Commit: 1da5339a2af10b39aa56f6d3f4bf30f48e059e43
Parents: 5fbee26
Author: Matt Gilman <ma...@gmail.com>
Authored: Mon Jan 12 10:24:38 2015 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Mon Jan 12 10:24:38 2015 -0500
----------------------------------------------------------------------
.../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/1da5339a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 42c7f45..c367860 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -1210,6 +1210,7 @@ nf.Canvas = (function () {
return {
init: function () {
var refreshed;
+ var zoomed = false;
// define the behavior
behavior = d3.behavior.zoom()
@@ -1217,7 +1218,13 @@ nf.Canvas = (function () {
.translate(TRANSLATE)
.scale(SCALE)
.on('zoom', function () {
- panning = true;
+ // if we have zoomed, indicate that we are panning
+ // to prevent deselection elsewhere
+ if (zoomed) {
+ panning = true;
+ } else {
+ zoomed = true;
+ }
// see if the scale has changed during this zoom event,
// we want to only transition when zooming in/out as running
@@ -1250,6 +1257,7 @@ nf.Canvas = (function () {
}
panning = false;
+ zoomed = false;
});
// add the behavior to the canvas and disable dbl click zoom