mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Applied no-mixed-operators linting rule
This commit is contained in:
@@ -6,6 +6,6 @@ export function uniformSelect(array, size) {
|
||||
}
|
||||
|
||||
return _.range(size).map(index =>
|
||||
array[parseInt(index * array.length / (size - 1 + 1e-9), 10)]
|
||||
array[parseInt(index * (array.length / (size - (1 - 1e-9))), 10)]
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { formatMetricSvg } from './string-utils';
|
||||
import { colors } from './color-utils';
|
||||
|
||||
export function getClipPathDefinition(clipId, size, height,
|
||||
x = -size * 0.5, y = size * 0.5 - height) {
|
||||
x = -size * 0.5, y = (size * 0.5) - height) {
|
||||
return (
|
||||
<defs>
|
||||
<clipPath id={clipId}>
|
||||
@@ -44,7 +44,7 @@ export function getMetricValue(metric, size) {
|
||||
let displayedValue = Number(value).toFixed(1);
|
||||
if (displayedValue > 0 && (!max || displayedValue < max)) {
|
||||
const baseline = 0.1;
|
||||
displayedValue = valuePercentage * (1 - baseline * 2) + baseline;
|
||||
displayedValue = (valuePercentage * (1 - (baseline * 2))) + baseline;
|
||||
} else if (displayedValue >= m.max && displayedValue > 0) {
|
||||
displayedValue = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user