From: Lucas Bergman Date: Thu, 7 Mar 2013 21:28:47 +0000 (-0600) Subject: dygraph-utils.js: Make Dygraph.error and Dygraph.update public X-Git-Tag: v1.0.0~40^2~1 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=e111936104130dd31c598b5109162a3a34ac2bcd;p=dygraphs.git dygraph-utils.js: Make Dygraph.error and Dygraph.update public These seem like reasonable utility functions, and they were used outside of Dygraph (specifically in DygraphOptions). Making these non-private resolves Closure Compiler warnings inside dygraph-options.js. --- diff --git a/dygraph-options.js b/dygraph-options.js index 6889a09..f1828d8 100644 --- a/dygraph-options.js +++ b/dygraph-options.js @@ -162,9 +162,9 @@ DygraphOptions.prototype.reparseSeries = function() { if (typeof(axis) == 'string') { if (!this.series_.hasOwnProperty(axis)) { - this.dygraph_.error("Series " + seriesName + " wants to share a y-axis with " + + Dygraph.error("Series " + seriesName + " wants to share a y-axis with " + "series " + axis + ", which does not define its own axis."); - return null; + return; } var yAxis = this.series_[axis].yAxis; this.series_[seriesName].yAxis = yAxis; diff --git a/dygraph-utils.js b/dygraph-utils.js index 2ccb3d0..250c855 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -135,7 +135,6 @@ Dygraph.prototype.warn = Dygraph.warn; /** * @param {string} message - * @private */ Dygraph.error = function(message) { Dygraph.log(Dygraph.ERROR, message); @@ -634,7 +633,6 @@ Dygraph.dateStrToMillis = function(str) { * @param {!Object} self * @param {!Object} o * @return {!Object} - * @private */ Dygraph.update = function(self, o) { if (typeof(o) != 'undefined' && o !== null) {