@syncfusion/ej2-base 31.1.17 → 31.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6041,6 +6041,10 @@ var NumberFormat$1 = /** @__PURE__ @class */ (function () {
6041
6041
  * @param {NumberFormatOptions} [option] ?
6042
6042
  * @returns {string} ?
6043
6043
  */
6044
+ NumberFormat.roundTo = function (value, digits) {
6045
+ var factor = Math.pow(10, digits);
6046
+ return (Math.round(value * factor) / factor).toFixed(digits);
6047
+ };
6044
6048
  NumberFormat.processFraction = function (value, min, max, option) {
6045
6049
  var temp = (value + '').split('.')[1];
6046
6050
  var length = temp ? temp.length : 0;
@@ -6059,7 +6063,7 @@ var NumberFormat$1 = /** @__PURE__ @class */ (function () {
6059
6063
  return value.toFixed(min);
6060
6064
  }
6061
6065
  else if (!isNullOrUndefined(max) && (length > max || max === 0)) {
6062
- return value.toFixed(max);
6066
+ return this.roundTo(value, max);
6063
6067
  }
6064
6068
  var str = value + '';
6065
6069
  if (str[0] === '0' && option && option.format === '###.00') {