move prev/nextRow into points array
authorDan Vanderkam <danvdk@gmail.com>
Tue, 2 Jul 2013 03:48:51 +0000 (23:48 -0400)
committerDan Vanderkam <danvdk@gmail.com>
Tue, 2 Jul 2013 03:48:51 +0000 (23:48 -0400)
extras/hairlines.js

index 8e3d7dd..edf0680 100644 (file)
@@ -269,6 +269,8 @@ hairlines.prototype.updateHairlineInfo = function() {
           canvasy: 1,  // TODO(danvk): real coordinate
           xval: h.xval,
           yval: yval,
+          prevRow: prevRow,
+          nextRow: nextRow,
           name: labels[i]
         });
       }
@@ -277,8 +279,6 @@ hairlines.prototype.updateHairlineInfo = function() {
     if (that.divFiller_) {
       that.divFiller_(h.infoDiv, {
         closestRow: row,
-        prevRow: prevRow,
-        nextRow: nextRow,
         points: selPoints,
         hairline: that.createPublicHairline_(h),
         dygraph: g