* @private
()
| 505 | * @private |
| 506 | */ |
| 507 | _resolveAnimations() { |
| 508 | const cached = this._cachedAnimations; |
| 509 | |
| 510 | if (cached) { |
| 511 | return cached; |
| 512 | } |
| 513 | |
| 514 | const chart = this.chart; |
| 515 | const options = this.options.setContext(this.getContext()); |
| 516 | const opts = options.enabled && chart.options.animation && options.animations; |
| 517 | const animations = new Animations(this.chart, opts); |
| 518 | if (opts._cacheable) { |
| 519 | this._cachedAnimations = Object.freeze(animations); |
| 520 | } |
| 521 | |
| 522 | return animations; |
| 523 | } |
| 524 | |
| 525 | /** |
| 526 | * @protected |
no test coverage detected