Showing
1 changed file
with
2 additions
and
1 deletions
... | ... | @@ -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 | } | ... | ... |