Commits

Anonymous committed 5db1dcf

clean up a few element declarations and comments.

  • Participants
  • Parent commits c3d2333

Comments (0)

Files changed (3)

File src/jqplot.axisTickRenderer.js

             this._elem = null;
         }
 
-
-        var elem = document.createElement('div');
-        this._elem = $(elem);
+        this._elem = $(document.createElement('div'));
         this._elem.addClass("jqplot-"+this.axis+"-tick");
         this._elem.text(this.label);
         this._elem.css(style);
 
-
-        // elem = $('<div '+style+' class="jqplot-'+this.axis+'-tick">'+this.label+'</div>');
         for (var s in this._styles) {
             this._elem.css(s, this._styles[s]);
         }
 			this._elem.addClass('jqplot-breakTick');
 		}
         
-        elem = null;
-        
         return this._elem;
     };
         

File src/jqplot.linearAxisRenderer.js

                 this._elem = null;
             }
             
-            var elem = document.createElement('div');
-            this._elem = $(elem);
+            this._elem = $(document.createElement('div'));
             this._elem.addClass('jqplot-axis jqplot-'+this.name);
             this._elem.css('posiiton', 'absolute');
-            elem = null;
 
             
             if (this.name == 'xaxis' || this.name == 'x2axis') {
             this.labelOptions.axis = this.name;
             this._label = new this.labelRenderer(this.labelOptions);
             if (this._label.show) {
-                elem = this._label.draw(ctx, plot);
+                var elem = this._label.draw(ctx, plot);
                 elem.appendTo(this._elem);
+                elem = null;
             }
     
             var t = this._ticks;
             }
             tick = null;
             t = null;
-            elem = null;
         }
         return this._elem;
     };

File src/plugins/jqplot.canvasAxisTickRenderer.js

         this._textRenderer.setText(this.label, ctx);
         var w = this.getWidth(ctx);
         var h = this.getHeight(ctx);
+        // canvases seem to need to have width and heigh attributes directly set.
         elem.width = w;
         elem.height = h;
         elem.style.width = w;