Merge pull request #457 from danvk/fix-log
authorDan Vanderkam <danvdk@gmail.com>
Wed, 5 Nov 2014 03:50:34 +0000 (22:50 -0500)
committerDan Vanderkam <danvdk@gmail.com>
Wed, 5 Nov 2014 03:50:34 +0000 (22:50 -0500)
Remove Dygraph.log and all its kin

1  2 
plugins/range-selector.js

@@@ -74,7 -74,7 +74,7 @@@ rangeSelector.prototype.createInterface
  
    // Range selector and animatedZooms have a bad interaction. See issue 359.
    if (this.getOption_('animatedZooms')) {
-     Dygraph.warn('Animated zooms and range selector are not compatible; disabling animatedZooms.');
+     console.warn('Animated zooms and range selector are not compatible; disabling animatedZooms.');
      this.dygraph_.updateOptions({animatedZooms: false}, true);
    }
  
@@@ -544,7 -544,7 +544,7 @@@ rangeSelector.prototype.drawStaticLayer
    try {
      this.drawMiniPlot_();
    } catch(ex) {
-     Dygraph.warn(ex);
+     console.warn(ex);
    }
  
    var margin = 0.5;
@@@ -594,13 -594,6 +594,13 @@@ rangeSelector.prototype.drawMiniPlot_ 
      var dataPoint = combinedSeriesData.data[i];
      var x = ((dataPoint[0] !== null) ? ((dataPoint[0] - xExtremes[0])*xFact) : NaN);
      var y = ((dataPoint[1] !== null) ? (canvasHeight - (dataPoint[1] - combinedSeriesData.yMin)*yFact) : NaN);
 +
 +    // Skip points that don't change the x-value. Overly fine-grained points
 +    // can cause major slowdowns with the ctx.fill() call below.
 +    if (!stepPlot && prevX !== null && Math.round(x) == Math.round(prevX)) {
 +      continue;
 +    }
 +
      if (isFinite(x) && isFinite(y)) {
        if(prevX === null) {
          ctx.lineTo(x, canvasHeight);