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/04/10 20:54:23 UTC

incubator-nifi git commit: NIFI-510: - Only reacting to window resize events when the target of the event is the window.

Repository: incubator-nifi
Updated Branches:
  refs/heads/develop cd845c08f -> df5755514


NIFI-510:
- Only reacting to window resize events when the target of the event is the window.

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

Branch: refs/heads/develop
Commit: df5755514c43bc297295ac8d39c650ab2aa381db
Parents: cd845c0
Author: Matt Gilman <ma...@gmail.com>
Authored: Fri Apr 10 14:48:01 2015 -0400
Committer: Matt Gilman <ma...@gmail.com>
Committed: Fri Apr 10 14:48:01 2015 -0400

----------------------------------------------------------------------
 .../src/main/webapp/js/nf/canvas/nf-canvas.js          |  8 +++++---
 .../src/main/webapp/js/application.js                  | 13 +++++++++----
 2 files changed, 14 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/df575551/nifi/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/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
index 6fda984..38894d8 100644
--- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
+++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas.js
@@ -529,9 +529,11 @@ nf.Canvas = (function () {
         };
 
         // listen for browser resize events to reset the graph size
-        $(window).on('resize', function () {
-            updateGraphSize();
-            nf.Settings.resetTableSize();
+        $(window).on('resize', function (e) {
+            if (e.target === window) {
+                updateGraphSize();
+                nf.Settings.resetTableSize();
+            }
         }).on('keydown', function (evt) {
             var isCtrl = evt.ctrlKey || evt.metaKey;
             

http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/df575551/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
----------------------------------------------------------------------
diff --git a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
index eb7bdfb..80a3df8 100644
--- a/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
+++ b/nifi/nifi-nar-bundles/nifi-update-attribute-bundle/nifi-update-attribute-ui/src/main/webapp/js/application.js
@@ -14,6 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+/* global Slick */
+
 $(document).ready(function () {
     ua.editable = $('#attribute-updater-editable').text() === 'true';
     ua.init();
@@ -43,10 +46,12 @@ var ua = {
         var actionsGrid = ua.initActionsGrid();
 
         // enable grid resizing
-        $(window).resize(function () {
-            conditionsGrid.resizeCanvas();
-            actionsGrid.resizeCanvas();
-            ua.resizeSelectedRuleNameField();
+        $(window).resize(function (e) {
+            if (e.target === window) {
+                conditionsGrid.resizeCanvas();
+                actionsGrid.resizeCanvas();
+                ua.resizeSelectedRuleNameField();
+            }
         });
 
         // initialize the rule list