(config)
| 11 | } |
| 12 | |
| 13 | configure(config) { |
| 14 | if (!isObject(config)) { |
| 15 | return; |
| 16 | } |
| 17 | |
| 18 | const animationOptions = Object.keys(defaults.animation); |
| 19 | const animatedProps = this._properties; |
| 20 | |
| 21 | Object.getOwnPropertyNames(config).forEach(key => { |
| 22 | const cfg = config[key]; |
| 23 | if (!isObject(cfg)) { |
| 24 | return; |
| 25 | } |
| 26 | const resolved = {}; |
| 27 | for (const option of animationOptions) { |
| 28 | resolved[option] = cfg[option]; |
| 29 | } |
| 30 | |
| 31 | (isArray(cfg.properties) && cfg.properties || [key]).forEach((prop) => { |
| 32 | if (prop === key || !animatedProps.has(prop)) { |
| 33 | animatedProps.set(prop, resolved); |
| 34 | } |
| 35 | }); |
| 36 | }); |
| 37 | } |
| 38 | |
| 39 | /** |
| 40 | * Utility to handle animation of `options`. |
no test coverage detected