From 6b97a1dda689b634683021e4b7b0d3c2cda590c9 Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Mon, 12 Jan 2015 09:33:53 -0500 Subject: [PATCH 1/3] NIFI-140: - Removing border radius on the storage usage progress bars. --- .../framework/web/nifi-web-ui/src/main/webapp/css/summary.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/summary.css b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/summary.css index c10992769c..bb7b9c46b2 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/summary.css +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/webapp/css/summary.css @@ -313,6 +313,7 @@ span.storage-usage-details { div.storage-usage-progressbar { height: 20px; border: 1px solid #aaaaaa; + border-radius: 0; } div.storage-usage-progressbar div.ui-progressbar-value { @@ -321,6 +322,7 @@ div.storage-usage-progressbar div.ui-progressbar-value { line-height: 20px; display: block; text-align: center; + border-radius: 0; } /* summary tabs */ From 1da5339a2af10b39aa56f6d3f4bf30f48e059e43 Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Mon, 12 Jan 2015 10:24:38 -0500 Subject: [PATCH 2/3] 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. --- .../src/main/webapp/js/nf/canvas/nf-canvas.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 42c7f454a8..c367860b77 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 From b6b1859475eadc7d2802b2da29863878f77d54cd Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Mon, 12 Jan 2015 12:56:37 -0500 Subject: [PATCH 3/3] NIFI-247: - Preventing zoom/pan events which was throwing off the selection when the cursor left the canvas when using the selection box to select multiple components. - Preventing default browser behavior which was changing the cursor to text-selection when using the selection box to select multiple components. --- .../src/main/webapp/js/nf/canvas/nf-canvas.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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 c367860b77..5c1cbb8faf 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 @@ -372,8 +372,12 @@ nf.Canvas = (function () { }) .datum(position); - // prevent further propagation (to parents) - d3.event.stopPropagation(); + // prevent further propagation (to parents and others handlers + // on the same element to prevent zoom behavior) + d3.event.stopImmediatePropagation(); + + // prevents the browser from changing to a text selection cursor + d3.event.preventDefault(); } }) .on('mousemove.selection', function () { @@ -385,7 +389,7 @@ nf.Canvas = (function () { // get the original position var originalPosition = selectionBox.datum(); var position = d3.mouse(canvas.node()); - + var d = {}; if (originalPosition[0] < position[0]) { d.x = originalPosition[0]; @@ -407,6 +411,7 @@ nf.Canvas = (function () { selectionBox.attr(d); } + // prevent further propagation (to parents) d3.event.stopPropagation(); } })