[dashboard] Recalculate grid base width on window resize
@@ -3767,6 +3767,7 @@ $(document).ready(function () {
window.setTimeout(function(){
resizeFieldsList();
}, 200);
+ huePubSub.publish('dashboard.window.resize');
});
%if USE_GRIDSTER.get():
@@ -3839,6 +3840,10 @@ $(document).ready(function () {
var widgetGridHeight = parseInt(hueUtils.getStyleFromCSSClass('[data-sizey="1"]').height);
var widgetGridWidth = parseInt(hueUtils.getStyleFromCSSClass('[data-sizex="1"]').width);
+ huePubSub.subscribe('dashboard.window.resize', function () {
+ widgetGridWidth = parseInt(hueUtils.getStyleFromCSSClass('[data-sizex="1"]').width);
+ }, 'dashboard');
+
function restoreWidgetSizes() {
$('li.gs-w').each(function () {
var $widget = $(this);
