From fc26991a8fc4c7f54c1bec2ad20fc5facabb4cc9 Mon Sep 17 00:00:00 2001 From: "peng.jianhua" Date: Wed, 15 Nov 2017 14:25:26 +0800 Subject: [PATCH 1/1] KYLIN-3042: In query results page, the results data table should resize when click fullScreen button --- webapp/app/js/directives/ui-grid.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/webapp/app/js/directives/ui-grid.js b/webapp/app/js/directives/ui-grid.js index 352e919a4..9523a2c62 100644 --- a/webapp/app/js/directives/ui-grid.js +++ b/webapp/app/js/directives/ui-grid.js @@ -3375,6 +3375,16 @@ function uiGridDirective($compile, $templateCache, $timeout, $window, gridUtil, } grid.refreshCanvas(true); }); + + // If 'ui.fullscreen' is changed, we need to watch and react + $scope.$watch('$parent.ui.fullScreen', function (newValue, oldValue) { + if (newValue === oldValue) { + return; + } + grid.gridWidth = $scope.gridWidth = gridUtil.elementWidth($elm); + grid.gridHeight = $scope.gridHeight = gridUtil.elementHeight($elm); + grid.refreshCanvas(true); + }); } // Initialize the directive -- 2.13.0.windows.1