From c39e1d9346b695648dc7dc0c2d08bf057aefb069 Mon Sep 17 00:00:00 2001 From: Dan Vanderkam Date: Mon, 9 May 2011 07:32:46 -0700 Subject: [PATCH] cleanup, jsdoc warning message --- dygraph.js | 27 +++++++++------------------ generate-jsdoc.sh | 11 +++++++++-- 2 files changed, 18 insertions(+), 20 deletions(-) diff --git a/dygraph.js b/dygraph.js index 78f933d..90c93a9 100644 --- a/dygraph.js +++ b/dygraph.js @@ -89,9 +89,7 @@ Dygraph.AXIS_LINE_WIDTH = 0.3; Dygraph.LOG_SCALE = 10; Dygraph.LN_TEN = Math.log(Dygraph.LOG_SCALE); -/** - * @private - */ +/** @private (shut up, jsdoc!) */ Dygraph.log10 = function(x) { return Math.log(x) / Dygraph.LN_TEN; } @@ -391,23 +389,17 @@ Dygraph.prototype.log = function(severity, message) { } }; -/** - * @private - */ +/** @private (shut up, jsdoc!) */ Dygraph.prototype.info = function(message) { this.log(Dygraph.INFO, message); }; -/** - * @private - */ +/** @private (shut up, jsdoc!) */ Dygraph.prototype.warn = function(message) { this.log(Dygraph.WARNING, message); }; -/** - * @private - */ +/** @private (shut up, jsdoc!) */ Dygraph.prototype.error = function(message) { this.log(Dygraph.ERROR, message); }; @@ -930,9 +922,7 @@ Dygraph.prototype.getColors = function() { // http://blog.firetree.net/2005/07/04/javascript-find-position/ // http://www.quirksmode.org/js/findpos.html -/** - * @private - */ +/** @private */ Dygraph.findPosX = function(obj) { var curleft = 0; if(obj.offsetParent) @@ -949,9 +939,7 @@ Dygraph.findPosX = function(obj) { }; -/** - * @private - */ +/** @private */ Dygraph.findPosY = function(obj) { var curtop = 0; if(obj.offsetParent) @@ -3240,7 +3228,9 @@ Dygraph.prototype.detectTypeFromString_ = function(str) { this.attrs_.xAxisLabelFormatter = Dygraph.dateAxisFormatter; } else { // TODO(danvk): use Dygraph.numberFormatter here? + /** @private (shut up, jsdoc!) */ this.attrs_.xValueFormatter = function(x) { return x; }; + /** @private (shut up, jsdoc!) */ this.attrs_.xValueParser = function(x) { return parseFloat(x); }; this.attrs_.xTicker = Dygraph.numericTicks; this.attrs_.xAxisLabelFormatter = this.attrs_.xValueFormatter; @@ -3475,6 +3465,7 @@ Dygraph.prototype.parseArray_ = function(data) { return parsedData; } else { // Some intelligent defaults for a numeric x-axis. + /** @private (shut up, jsdoc!) */ this.attrs_.xValueFormatter = function(x) { return x; }; this.attrs_.xTicker = Dygraph.numericTicks; return data; diff --git a/generate-jsdoc.sh b/generate-jsdoc.sh index 3275545..36b6c50 100755 --- a/generate-jsdoc.sh +++ b/generate-jsdoc.sh @@ -3,7 +3,14 @@ # Generates JSDoc in the /jsdoc dir. Clears any existing jsdoc there. rm -rf jsdoc +echo Generating JSDoc... java -jar jsdoc-toolkit/jsrun.jar \ jsdoc-toolkit/app/run.js \ - -a -d=jsdoc -t=jsdoc-toolkit/templates/jsdoc \ - dygraph.js + -d=jsdoc -t=jsdoc-toolkit/templates/jsdoc \ + dygraph.js > /tmp/dygraphs-jsdocerrors.txt + +if [ -n /tmp/dygraphs-jsdocerrors.txt ]; then + echo Please fix any jsdoc errors/warnings before sending patches. +fi + +echo Done -- 2.7.4