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

Function resolveTargetOptions

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

Source from the content-addressed store, hash-verified

145}
146
147function resolveTargetOptions(target, newOptions) {
148 if (!newOptions) {
149 return;
150 }
151 let options = target.options;
152 if (!options) {
153 target.options = newOptions;
154 return;
155 }
156 if (options.$shared) {
157 // Going from shared options to distinct one:
158 // Create new options object containing the old shared values and start updating that.
159 target.options = options = Object.assign({}, options, {$shared: false, $animations: {}});
160 }
161 return options;
162}

Callers 1

_animateOptionsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected