From 1e41bd2d1457ffb8fc0b31ff7e1181b583c123ca Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Wed, 10 Nov 2010 11:38:54 -0500 Subject: [PATCH] be a little less aggressive in underlayCallback changes --- dygraph-canvas.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 23e93a8..8dc502c 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -393,7 +393,9 @@ DygraphCanvasRenderer.prototype.render = function() { function halfDown(y){return Math.round(y)-0.5}; if (this.options.underlayCallback) { - this.options.underlayCallback(ctx, this.area, this.dygraph_); + // NOTE: we pass the dygraph object to this callback twice to avoid breaking + // users who expect a deprecated form of this callback. + this.options.underlayCallback(ctx, this.area, this.dygraph_, this.dygraph_); } if (this.options.drawYGrid) { -- 2.7.4