MCPcopy
hub / github.com/chartjs/Chart.js / _resolveAnimations

Method _resolveAnimations

src/plugins/plugin.tooltip.js:507–523  ·  src/plugins/plugin.tooltip.js::Tooltip._resolveAnimations

* @private

()

Source from the content-addressed store, hash-verified

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

Callers 3

updateMethod · 0.95

Calls 2

getContextMethod · 0.95
setContextMethod · 0.80

Tested by

no test coverage detected