diff --git a/ui/src/app/components/dashboard.directive.js b/ui/src/app/components/dashboard.directive.js index 417ddb1656..b4912eacc9 100644 --- a/ui/src/app/components/dashboard.directive.js +++ b/ui/src/app/components/dashboard.directive.js @@ -234,54 +234,68 @@ function DashboardController($scope, $rootScope, $element, $timeout, $mdMedia, $ removeResizeListener(gridsterParent[0], onGirdsterParentResize); // eslint-disable-line no-undef }); + watchWidgets(); + function onGirdsterParentResize() { if (gridsterParent.height() && autofillHeight()) { updateMobileOpts(); } } - $scope.$watchCollection('vm.widgets', function () { - sortWidgets(); - var ids = []; - for (var i=0;i