MCPcopy Create free account
hub / github.com/chartjs/Chart.js / resolveTargetOptions

Function resolveTargetOptions

src/core/core.animations.js:195–210  ·  view source on GitHub ↗
(target, newOptions)

Source from the content-addressed store, hash-verified

193}
194
195function resolveTargetOptions(target, newOptions) {
196 if (!newOptions) {
197 return;
198 }
199 let options = target.options;
200 if (!options) {
201 target.options = newOptions;
202 return;
203 }
204 if (options.$shared) {
205 // Going from shared options to distinct one:
206 // Create new options object containing the old shared values and start updating that.
207 target.options = options = Object.assign({}, options, {$shared: false, $animations: {}});
208 }
209 return options;
210}

Callers 1

_animateOptionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected