Browse Source

Merge pull request #173 from thingsboard/feature/TB-63

TB-63: Layout improvements.
pull/175/head
Igor Kulikov 9 years ago
committed by GitHub
parent
commit
3ecf91c5be
  1. 3
      ui/src/app/components/dashboard.directive.js

3
ui/src/app/components/dashboard.directive.js

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

Loading…
Cancel
Save