X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=plugins%2Fgrid.js;h=9186dd41f09c0ddc8b18115353a8ba172791bd46;hb=1a7fbe3b8e7fd316688add664c02d3eb5234c7aa;hp=3ccc2aeceb3aa46795028a848e4227fe68dbec61;hpb=cbe41be103cc129ff2477a872cb802538aafb3d3;p=dygraphs.git diff --git a/plugins/grid.js b/plugins/grid.js index 3ccc2ae..9186dd4 100644 --- a/plugins/grid.js +++ b/plugins/grid.js @@ -3,12 +3,15 @@ * Copyright 2012 Dan Vanderkam (danvdk@gmail.com) * MIT-licensed (http://opensource.org/licenses/MIT) */ +/*global Dygraph:false */ Dygraph.Plugins.Grid = (function() { /* Current bits of jankiness: +- Direct layout access +- Direct area access */ @@ -30,11 +33,11 @@ grid.prototype.toString = function() { grid.prototype.activate = function(g) { return { - drawChart: this.drawChart + willDrawChart: this.willDrawChart }; }; -grid.prototype.drawChart = function(e) { +grid.prototype.willDrawChart = function(e) { // Draw the new X/Y grid. Lines appear crisper when pixels are rounded to // half-integers. This prevents them from drawing in two rows/cols. var g = e.dygraph; @@ -81,7 +84,7 @@ grid.prototype.drawChart = function(e) { } ctx.restore(); } -} +}; grid.prototype.destroy = function() { };