NIFI-325:
- Ensuring empty selection does enable the fill color dialog.

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

Branch: refs/heads/NIFI-360
Commit: d76fe229bb9eeead9a9daa541141588ab8b5d13a
Parents: 0047fa4
Author: Matt Gilman <matt.c.gil...@gmail.com>
Authored: Thu Feb 19 06:55:38 2015 -0500
Committer: Matt Gilman <matt.c.gil...@gmail.com>
Committed: Thu Feb 19 06:55:38 2015 -0500

----------------------------------------------------------------------
 .../nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js  | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/d76fe229/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
----------------------------------------------------------------------
diff --git 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
index 796ffdf..720a23e 100644
--- 
a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
+++ 
b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js
@@ -481,6 +481,10 @@ nf.CanvasUtils = (function () {
          * @returns {boolean}
          */
         isColorable: function(selection) {
+            if (selection.empty()) {
+                return false;
+            }
+            
             // determine if the current selection is entirely processors or 
labels
             var selectedProcessors = selection.filter(function(d) {
                 return nf.CanvasUtils.isProcessor(d3.select(this));

Reply via email to