small code cleanup in grafanaGraph
This commit is contained in:
@@ -45,7 +45,15 @@ function (angular, $, kbn, moment, _) {
|
||||
|
||||
function setElementHeight() {
|
||||
try {
|
||||
elem.css({ height: scope.height || scope.panel.height || scope.row.height });
|
||||
var height = scope.height || scope.panel.height || scope.row.height;
|
||||
height = height.replace('px', '') - 32; // subtract panel title bar
|
||||
|
||||
if (scope.panel.legend.show) {
|
||||
height = height - 35; // subtract one line legend
|
||||
}
|
||||
|
||||
elem.css('height', height + 'px');
|
||||
|
||||
return true;
|
||||
} catch(e) { // IE throws errors sometimes
|
||||
return false;
|
||||
|
||||
@@ -77,7 +77,7 @@ code, pre {
|
||||
}
|
||||
|
||||
.panel-content {
|
||||
padding: 0px 10px 10px 10px;
|
||||
padding: 0px 10px 0 10px;
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
|
||||
Reference in New Issue
Block a user