Repository: nifi
Updated Branches:
  refs/heads/master 61a2054b3 -> 8ed66e5df


[NIFI-1879] Update containment for status history dialog. This closes #557


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

Branch: refs/heads/master
Commit: 8ed66e5df19785ae31ee6512e93f20d36c05e2f2
Parents: 61a2054
Author: Scott Aslan <[email protected]>
Authored: Tue Jun 21 17:19:40 2016 -0400
Committer: Matt Gilman <[email protected]>
Committed: Tue Jun 21 21:49:36 2016 -0400

----------------------------------------------------------------------
 .../src/main/webapp/js/nf/nf-status-history.js           | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi/blob/8ed66e5d/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
----------------------------------------------------------------------
diff --git 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
index 6ff4f21..797aaad 100644
--- 
a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
+++ 
b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/nf-status-history.js
@@ -850,15 +850,18 @@ nf.StatusHistory = (function () {
             },
             start: function (e, ui) {
                 var helperOffset = ui.helper.offset();
-                var dialogOuter = ((statusHistoryDialog.outerWidth() - 
statusHistoryDialog.width()) / 2);
+                var dialogOuter = ((statusHistoryDialog.outerWidth() - 
statusHistoryDialog.width()) / 2) + 8; //8 for the box shadow
+                var dialogContent = 
statusHistoryDialog.find('.dialog-content');
+                var dialogContentPaddingRight = ((dialogContent.outerWidth() - 
dialogContent.width()) / 2);
                 var chartOuter = chartContainer.outerWidth() - 
chartContainer.width();
 
                 // calculate the max width of the component
-                maxWidth = $(document).width() - helperOffset.left - 
dialogOuter - chartOuter;
+                maxWidth = $('body').width() - helperOffset.left - dialogOuter 
- dialogContentPaddingRight - chartOuter;
 
                 // calculate the max height of the component
-                var containerOuter = 
$('#status-history-container').outerHeight(true) - 
$('#status-history-container').height();
-                maxHeight = $(document).height() - helperOffset.top - 
dialogOuter - chartOuter - containerOuter - 
chartControlContainer.outerHeight(true);
+                var dialogContentPaddingBottom = ((dialogContent.outerHeight() 
- dialogContent.height()) / 2);
+                var dialogButtonsHeight = 
statusHistoryDialog.find('.dialog-buttons').height() + 5; //5 for the box shadow
+                maxHeight = $('body').height() - helperOffset.top - 
dialogOuter - chartOuter - dialogContentPaddingBottom - dialogButtonsHeight - 
chartControlContainer.outerHeight(true);
 
                 // record the current extent so it can be reset on stop
                 if (!brush.empty()) {

Reply via email to