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 2014/12/19 13:33:57 UTC

[28/43] incubator-nifi git commit: NIFI-143: - Using the datum from the appropriate selection. - Handling group selection.

NIFI-143:
- Using the datum from the appropriate selection.
- Handling group selection.

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

Branch: refs/heads/nifi-27
Commit: 15d7031ebda7faa6a2297ddf090c3ea0b17a32fb
Parents: a94cf4b
Author: Matt Gilman <ma...@gmail.com>
Authored: Tue Dec 16 15:34:39 2014 -0500
Committer: Matt Gilman <ma...@gmail.com>
Committed: Tue Dec 16 15:34:39 2014 -0500

----------------------------------------------------------------------
 .../src/main/webapp/js/nf/canvas/nf-process-group.js   | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/15d7031e/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
----------------------------------------------------------------------
diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
index a585fc8..0bd522c 100644
--- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
+++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-process-group.js
@@ -164,12 +164,15 @@ nf.ProcessGroup = (function () {
                             var targetData = target.datum();
                             
                             // see if there is a selection being dragged
-                            var selection = d3.select('rect.drag-selection');
-                            if (!selection.empty()) {
-                                var selectionData = selection.datum();
+                            var drag = d3.select('rect.drag-selection');
+                            if (!drag.empty()) {
+                                // filter the current selection by this group
+                                var selection = nf.CanvasUtils.getSelection().filter(function(d) {
+                                    return targetData.component.id === d.component.id;
+                                });
                                 
-                                // ensure what is being dragged isn't the target
-                                if (targetData.component.id !== selectionData.component.id) {
+                                // ensure this group isn't in the selection
+                                if (selection.empty()) {
                                     // mark that we are hovering over a drop area if appropriate 
                                     target.classed('drop', function () {
                                         // get the current selection and ensure its disconnected