[Limits] Begin using limits from scrolling list view

WTD-1223.
This commit is contained in:
Victor Woeltjen
2015-06-05 17:59:58 -07:00
parent dc6c43a4cd
commit 88f938b1b6
3 changed files with 15 additions and 7 deletions

View File

@ -55,9 +55,17 @@ define(
* @returns {string} the text to display
*/
getValue: function (domainObject, data, index) {
return telemetryFormatter.formatRangeValue(
data.getRangeValue(index, rangeMetadata.key)
);
var range = rangeMetadata.key,
limit = domainObject.getCapability('limit'),
value = data.getRangeValue(index, range),
cell = telemetryFormatter.formatRangeValue(value);
return {
cssClass: limit && limit.evaluate(value, range),
toString: function () {
return cell;
}
};
}
};
}