Commits

Chris Leonello  committed bc01b56

Cleaned up a lot of lint.

  • Participants
  • Parent commits a96b988

Comments (0)

Files changed (5)

File src/jqplot.toImage.js

         return style.join(' ');
     };
 
-
-
     /**
      * Namespace: $.fn
      * jQuery namespace to attach functions to jQuery elements.
     $.fn.jqplotToImageCanvas = function(options) {
 
         options = options || {};
-        x_offset = (options.x_offset == null) ? 0 : options.x_offset;
-        y_offset = (options.y_offset == null) ? 0 : options.y_offset;
-        backgroundColor = (options.backgroundColor == null) ? 'rgb(255,255,255)' : options.backgroundColor;
+        var x_offset = (options.x_offset == null) ? 0 : options.x_offset;
+        var y_offset = (options.y_offset == null) ? 0 : options.y_offset;
+        var backgroundColor = (options.backgroundColor == null) ? 'rgb(255,255,255)' : options.backgroundColor;
 
         if ($(this).width() == 0 || $(this).height() == 0) {
             return null;
         var plotleft = offs.left;
         var plottop = offs.top;
         var transx = 0, transy = 0;
-        // var tlw = tlh = tll = tlr = tlt = tlb = 0;
-        // console.log("chart: height: %s, width: %s, left: %s, top: %s, transx: %s, transy: %s", h, w, plotleft, plottop, transx, transy);
 
         // have to check if any elements are hanging outside of plot area before rendering,
         // since changing width of canvas will erase canvas.
 
         var temptop, templeft, tempbottom, tempright;
 
-        for (i in clses) {
+        for (var i in clses) {
             $(this).find('.'+clses[i]).each(function() {
                 temptop = $(this).offset().top - plottop;
                 templeft = $(this).offset().left - plotleft;
                 if (tempbottom > h) {
                     h =  tempbottom;
                 }
-                // console.log(this.tagName);
-                // console.log(temptop, templeft, tempright, tempbottom);
-                // console.log(w, h, transx, transy);
             });
         }
-        // console.log("chart: height: %s, width: %s, left: %s, top: %s, transx: %s, transy: %s", h, w, plotleft, plottop, transx, transy);
 
         newCanvas.width = w + Number(x_offset);
         newCanvas.height = h + Number(y_offset);
             if (isNaN(lineheight)) {
                 lineheight = parseInt($(el).css('font-size')) * 1.2;
             }
-
             return lineheight;
         }
 
                 if ($(el).css('textAlign') === 'center') {
                     templeft = left + (canvasWidth - context.measureText(w).width)/2  - transx;
                 }
-                context.fillText(w, templeft, temptop)
+                context.fillText(w, templeft, temptop);
             }
 
         }
                     newContext.strokeRect(left, top, $(el).innerWidth(), $(el).innerHeight());
                 }
 
-
-
                 // find all the swatches
                 $(el).find('div.jqplot-table-legend-swatch-outline').each(function() {
                     // get the first div and stroke it
                     newContext.fillRect(l, t, w, h);
                 });
 
-
                 // now add text
 
                 $(el).find('td.jqplot-table-legend-label').each(function(){
                     newContext.fillText(elem.text(), l, t);
                 });
 
-                elem = null;
+                var elem = null;
             }
 
             else if (tagname == 'canvas') {
         }
     };
     
-})(jQuery);
+})(jQuery);

File src/plugins/jqplot.canvasOverlay.js

             // Format string passed the x and y values of the cursor on the line.
             // e.g., 'Dogs: %.2f, Cats: %d'.
             tooltipFormatString: '%d, %d'
-        }
+        };
     }
 
     /**
                 break;
             case 'n':
                 x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true)/2;
-                y = gridpos[1] + plot._gridPadding.top - opts.tooltipOffset - elem.outerHeight(true)
+                y = gridpos[1] + plot._gridPadding.top - opts.tooltipOffset - elem.outerHeight(true);
                 break;
             case 'ne':
                 x = gridpos[0] + plot._gridPadding.left + opts.tooltipOffset;
                 y = gridpos[1] + plot._gridPadding.top + opts.tooltipOffset;
                 break;
             case 'w':
-                x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset
+                x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset;
                 y = gridpos[1] + plot._gridPadding.top - elem.outerHeight(true)/2;
                 break;
             default: // same as 'nw'
 
     function isNearLine(point, lstart, lstop, width) {
         // r is point to test, p and q are end points.
-        rx = point[0];
-        ry = point[1];
-        px = Math.round(lstop[0]);
-        py = Math.round(lstop[1]);
-        qx = Math.round(lstart[0]);
-        qy = Math.round(lstart[1]);
+        var rx = point[0];
+        var ry = point[1];
+        var px = Math.round(lstop[0]);
+        var py = Math.round(lstop[1]);
+        var qx = Math.round(lstart[0]);
+        var qy = Math.round(lstart[1]);
 
         var l = Math.sqrt(Math.pow(px-qx, 2) + Math.pow(py-qy, 2));
 

File src/plugins/jqplot.pyramidAxisRenderer.js

         var tumax;
         var maxVisibleTicks;
         var val;
-        var sklip = null;
+        var skip = null;
         var temp;
         
         // if we already have ticks, use them.
         }
 
         ticks = null;
-    }
+    };
 })(jQuery);

File src/plugins/jqplot.pyramidGridRenderer.js

             axis: 'y',
             start: null,
             interval: 10
-        }
+        };
         $.extend(true, this, options);
         // set the shadow renderer options
         var sopts = {lineJoin:'miter', lineCap:'round', fill:false, isarc:false, angle:this.shadowAngle, offset:this.shadowOffset, alpha:this.shadowAlpha, depth:this.shadowDepth, lineWidth:this.shadowWidth, closePath:false, strokeStyle:this.shadowColor};

File src/plugins/jqplot.pyramidRenderer.js

             }
             var positiveColor = opts.fillStyle;
             var base;
-            var xstart = this._xaxis.series_u2p(this._xnudge);; 
+            var xstart = this._xaxis.series_u2p(this._xnudge);
             var ystart = this._yaxis.series_u2p(this._yaxis.min);
             var yend = this._yaxis.series_u2p(this._yaxis.max);
             var bw2 = this.barWidth/2.0;
                     }
                     else {
                         // xstart = this._xaxis.series_u2p(0);
-                        w = xstart - gridData[i][0];;
+                        w = xstart - gridData[i][0];
                         h = this.barWidth;
                         points = [gridData[i][0], base - bw2, w, h];
                     }