Commit 49141c5f54593ff63222400b219c53d2b8bf692b

Authored by Igor Kulikov
1 parent dcd1c27d

TB-63: Layout improvements.

... ... @@ -356,6 +356,7 @@ function DashboardController($scope, $rootScope, $element, $timeout, $mdMedia, $
356 356 var margins = vm.margins ? vm.margins : [10, 10];
357 357 if (!angular.equals(vm.gridsterOpts.margins, margins)) {
358 358 vm.gridsterOpts.margins = margins;
  359 + updateMobileOpts();
359 360 if (vm.gridster) {
360 361 vm.gridster.margins = vm.margins;
361 362 updateGridsterParams();
... ... @@ -413,7 +414,7 @@ function DashboardController($scope, $rootScope, $element, $timeout, $mdMedia, $
413 414 var sizeY = widgetSizeY(w);
414 415 totalRows += sizeY;
415 416 }
416   - rowHeight = (viewportHeight - (vm.gridsterOpts.margins[1])) / totalRows;
  417 + rowHeight = (viewportHeight - vm.gridsterOpts.margins[1]*(vm.widgets.length+1) + vm.gridsterOpts.margins[0]*vm.widgets.length) / totalRows;
417 418 }
418 419 return rowHeight;
419 420 }
... ...