Browse Source

HUE-7949 [dashboard] Use the whole width of the page for the widgets after loading an existing dashboard

Enrico Berti 7 years ago
parent
commit
6a3200b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      desktop/libs/dashboard/src/dashboard/templates/common_search.mako

+ 3 - 0
desktop/libs/dashboard/src/dashboard/templates/common_search.mako

@@ -4057,6 +4057,9 @@ $(document).ready(function () {
 
   window.setInterval(function () {
     if (searchViewModel.isGridster() && !isDraggingOrResizingWidgets) {
+      if ($('.gridster li:first').width() !== $('.gridster').width()) {
+        $(window).trigger('resize');
+      }
       var $gridster = $('.gridster>ul').data('gridster');
       searchViewModel.gridItems().forEach(function (existingWidget) {
         var scrollDifference = existingWidget.gridsterElement.scrollHeight - existingWidget.gridsterElement.clientHeight;