mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-29 13:38:44 +02:00
17 lines
514 B
JavaScript
17 lines
514 B
JavaScript
c3_chart_internal_fn.hasCaches = function (ids) {
|
|
for (var i = 0; i < ids.length; i++) {
|
|
if (! (ids[i] in this.cache)) { return false; }
|
|
}
|
|
return true;
|
|
};
|
|
c3_chart_internal_fn.addCache = function (id, target) {
|
|
this.cache[id] = this.cloneTarget(target);
|
|
};
|
|
c3_chart_internal_fn.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;
|
|
};
|