"2011-05-05,8,3\n";
UpdateOptionsTestCase.prototype.setUp = function() {
- document.body.innerHTML = "<div id='graph'></div>";
+ document.body.innerHTML = "<div id='graph'></div><div id='labels'>";
};
UpdateOptionsTestCase.prototype.tearDown = function() {
this.unWrap(oldDrawGraph);
assertTrue(graph._testDrawCalled);
};
+
+// Test https://github.com/danvk/dygraphs/issues/87
+UpdateOptionsTestCase.prototype.testUpdateLabelsDivDoesntInfiniteLoop = function() {
+ var graphDiv = document.getElementById("graph");
+ var labelsDiv = document.getElementById("labels");
+ var graph = new Dygraph(graphDiv, this.data, this.opts);
+ graph.updateOptions({labelsDiv : labelsDiv});
+}
+
self[k] = null;
} else if (Dygraph.isArrayLike(o[k])) {
self[k] = o[k].slice();
+ } else if (o[k] instanceof Node) {
+ // DOM objects are shallowly-copied.
+ self[k] = o[k];
} else if (typeof(o[k]) == 'object') {
if (typeof(self[k]) != 'object') {
self[k] = {};