* Return the multiplied raw value with the `rawValueDivisor`. * This is used to display different values between the raw and formatted values. * * @param {number|string|null} rawValue The numeric value as understood by Javascript like a `Number` * @returns {number|string|null}
(rawValue)
| 2354 | * @private |
| 2355 | */ |
| 2356 | _getRawValueToFormat(rawValue) { |
| 2357 | let rawValueForTheElementValue; |
| 2358 | if ((!AutoNumericHelper.isNull(this.settings.rawValueDivisor) && this.settings.rawValueDivisor !== 0) && // Only multiply if the `rawValueDivisor` option is set |
| 2359 | rawValue !== '' && rawValue !== null) { // Do not modify the `rawValue` if it's an empty string or null |
| 2360 | // !this._isUserManuallyEditingTheValue()) { // If the user is NOT manually changing the element value, but that is done programmatically |
| 2361 | rawValueForTheElementValue = rawValue * this.settings.rawValueDivisor; |
| 2362 | } else { |
| 2363 | rawValueForTheElementValue = rawValue; |
| 2364 | } |
| 2365 | |
| 2366 | return rawValueForTheElementValue; |
| 2367 | } |
| 2368 | |
| 2369 | /** |
| 2370 | * Check if the given value has a corresponding key in the `valuesToStrings` option object. |
no test coverage detected