| Current Path : /home/emeraadmin/www/node_modules/c3/src/ |
| Current File : /home/emeraadmin/www/node_modules/c3/src/cache.js |
import { ChartInternal } from './core';
ChartInternal.prototype.hasCaches = function (ids) {
for (var i = 0; i < ids.length; i++) {
if (! (ids[i] in this.cache)) { return false; }
}
return true;
};
ChartInternal.prototype.addCache = function (id, target) {
this.cache[id] = this.cloneTarget(target);
};
ChartInternal.prototype.getCaches = function (ids) {
var targets = [], i;
for (i = 0; i < ids.length; i++) {
if (ids[i] in this.cache) { targets.push(this.cloneTarget(this.cache[ids[i]])); }
}
return targets;
};