You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
564 B
18 lines
564 B
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; |
|
};
|
|
|