(inputRawOption: RangeOption)
| 392 | } |
| 393 | |
| 394 | private _updateRangeUse(inputRawOption: RangeOption): void { |
| 395 | const rangePropMode = this._rangePropMode; |
| 396 | const rangeModeInOption = this.get('rangeMode'); |
| 397 | |
| 398 | each([['start', 'startValue'], ['end', 'endValue']] as const, function (names, index) { |
| 399 | const percentSpecified = inputRawOption[names[0]] != null; |
| 400 | const valueSpecified = inputRawOption[names[1]] != null; |
| 401 | if (percentSpecified && !valueSpecified) { |
| 402 | rangePropMode[index] = 'percent'; |
| 403 | } |
| 404 | else if (!percentSpecified && valueSpecified) { |
| 405 | rangePropMode[index] = 'value'; |
| 406 | } |
| 407 | else if (rangeModeInOption) { |
| 408 | rangePropMode[index] = rangeModeInOption[index]; |
| 409 | } |
| 410 | else if (percentSpecified) { // percentSpecified && valueSpecified |
| 411 | rangePropMode[index] = 'percent'; |
| 412 | } |
| 413 | // else remain its original setting. |
| 414 | }); |
| 415 | } |
| 416 | |
| 417 | noTarget(): boolean { |
| 418 | return this._noTarget; |
no test coverage detected