if (!isObject(cfg)) {
return;
}
- for (let prop of cfg.properties || [key]) {
+ (cfg.properties || [key]).forEach(function(prop) {
// Can have only one config per animation.
if (!animatedProps.has(prop)) {
animatedProps.set(prop, extend({}, animDefaults, cfg));
// Single property targetting config wins over multi-targetting.
animatedProps.set(prop, extend({}, animatedProps.get(prop), cfg));
}
- }
+ });
});
}
_update() {
const me = this;
const date = Date.now();
- const charts = me._charts;
let remaining = 0;
- for (let [chart, anims] of charts) {
+ me._charts.forEach(function(anims, chart) {
if (!anims.running || !anims.items.length) {
- continue;
+ return;
}
const items = anims.items;
let i = items.length - 1;
}
remaining += items.length;
- }
+ });
- this._lastDate = date;
+ me._lastDate = date;
if (remaining === 0) {
- this._running = false;
+ me._running = false;
}
}