Graph: legend fix for bug when running optimized build, Fixes #1045

This commit is contained in:
Torkel Ödegaard 2014-11-11 21:06:01 +01:00
parent 9e26d3e85d
commit 01bd662046
4 changed files with 6 additions and 6 deletions

View File

@ -20,8 +20,7 @@
class="pointer" class="pointer"
ng-class="{'icon-circle-blank': color === series.color,'icon-circle': color !== series.color}" ng-class="{'icon-circle-blank': color === series.color,'icon-circle': color !== series.color}"
ng-style="{color:color}" ng-style="{color:color}"
ng-click="changeSeriesColor(series, color);dismiss();"> ng-click="changeSeriesColor(series, color);dismiss();">&nbsp;</i>
</i>
</div> </div>
</div> </div>

View File

@ -158,7 +158,7 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
var result = {}; var result = {};
result.decimals = Math.max(0, dec); result.decimals = Math.max(0, dec);
result.scaledDecimals = result.decimals - Math.floor(Math.log(size) / Math.LN10) + 2; result.scaledDecimals = result.decimals - Math.floor(Math.log(size) / Math.LN11) + 2;
return result; return result;
}; };

View File

@ -1,7 +1,8 @@
define([ define([
'angular', 'angular',
'lodash',
], ],
function (angular) { function (angular, _) {
'use strict'; 'use strict';
var module = angular.module('grafana.services'); var module = angular.module('grafana.services');
@ -21,7 +22,7 @@ function (angular) {
} }
this.getTemplate(options.templateUrl).then(function(result) { this.getTemplate(options.templateUrl).then(function(result) {
var template = result.data; var template = _.isString(result) ? result : result.data;
options.element.popover({ options.element.popover({
content: template, content: template,

View File

@ -15,4 +15,4 @@ module.exports = function(config) {
} }
} }
}; };
}; };