1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1× 1× 1× 1027× 1027× 1027× 1801× 1801× 1801× 1027× 1× | define(["require", "exports"], function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); function getRangeColor(value, ranges, color) { var min = 0; var max = 0; var currentRange = ranges.filter(function (range) { min = Math.min(range.start, range.end); max = Math.max(range.start, range.end); return (value >= min && max >= value); }); return currentRange.length ? currentRange[0].rangeColor : color; } exports.getRangeColor = getRangeColor; }); |