From e111936104130dd31c598b5109162a3a34ac2bcd Mon Sep 17 00:00:00 2001 From: Lucas Bergman Date: Thu, 7 Mar 2013 15:28:47 -0600 Subject: [PATCH] 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. --- dygraph-options.js | 4 ++-- dygraph-utils.js | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) 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) { -- 2.7.4