(target, newOptions)
| 145 | } |
| 146 | |
| 147 | function 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 | } |