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

Method update

src/core/core.animation.js:51–65  ·  view source on GitHub ↗
(cfg, to, date)

Source from the content-addressed store, hash-verified

49 }
50
51 update(cfg, to, date) {
52 if (this._active) {
53 this._notify(false);
54
55 const currentValue = this._target[this._prop];
56 const elapsed = date - this._start;
57 const remain = this._duration - elapsed;
58 this._start = date;
59 this._duration = Math.floor(Math.max(remain, cfg.duration));
60 this._total += elapsed;
61 this._loop = !!cfg.loop;
62 this._to = resolve([cfg.to, to, currentValue, cfg.from]);
63 this._from = resolve([cfg.from, currentValue, to]);
64 }
65 }
66
67 cancel() {
68 if (this._active) {

Callers

nothing calls this directly

Calls 2

_notifyMethod · 0.95
resolveFunction · 0.85

Tested by

no test coverage detected