From: Robert Konigsberg Date: Wed, 13 Jun 2012 21:13:24 +0000 (-0400) Subject: Document the role of makeNextPointStep. X-Git-Tag: v1.0.0~238^2^2~24 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=ccb0001c3c8aadd02358995c8d7b71fbb37c0bc3;p=dygraphs.git Document the role of makeNextPointStep. --- diff --git a/dygraph-canvas.js b/dygraph-canvas.js index 4c99352..3f1b17b 100644 --- a/dygraph-canvas.js +++ b/dygraph-canvas.js @@ -677,9 +677,17 @@ DygraphCanvasRenderer.prototype._renderAnnotations = function() { } }; +/** + * Returns a function which returns the next index with a renderable point. + * When connectSeparatedPoints is false, it just returns the next index. + * But when it's true, the returned function will skip past points with null + * yvals. + * + * @private + */ DygraphCanvasRenderer.makeNextPointStep_ = function( - connect, points, start, end) { - if (connect) { + connectSeparatedPoints, points, start, end) { + if (connectSeparatedPoints) { return function(j) { while (++j + start < end) { if (!(points[start + j].yval === null)) break;