diff options
Diffstat (limited to 'web/nms.gathering.org/speedometer/c3-master/src/cache.js')
| -rw-r--r-- | web/nms.gathering.org/speedometer/c3-master/src/cache.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/web/nms.gathering.org/speedometer/c3-master/src/cache.js b/web/nms.gathering.org/speedometer/c3-master/src/cache.js new file mode 100644 index 0000000..6566616 --- /dev/null +++ b/web/nms.gathering.org/speedometer/c3-master/src/cache.js @@ -0,0 +1,16 @@ +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; +}; |
