From 8ed66e5df19785ae31ee6512e93f20d36c05e2f2 Mon Sep 17 00:00:00 2001 From: Scott Aslan Date: Tue, 21 Jun 2016 17:19:40 -0400 Subject: [PATCH] [NIFI-1879] Update containment for status history dialog. This closes #557 --- .../src/main/webapp/js/nf/nf-status-history.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 6ff4f219b5..797aaade06 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()) {