Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove params from Axis constructor

  • Loading branch information...
commit cd44b441750f7faec48d62f9431d36690c44e144 1 parent c3c7bc8
Samvel Khalatyan authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 js/Axis.js
View
14 js/Axis.js
@@ -22,7 +22,7 @@
//
var Axis = new Class(
{
- initialize: function(min, max, bins)
+ initialize: function()
{
this._axis_min = 0; // Axis minimum value
this._axis_max = 0; // Axis maximum value
@@ -30,15 +30,17 @@ var Axis = new Class(
this._axis_underflow_bin = 0; // cached underflow bin
this._axis_overflow_bin = 0; // cahced overflow bin #
-
- this.initWithMinMaxBins(min, max, bins);
},
initWithMinMaxBins: function(min, max, bins)
{
if (max <= min
|| 0 >= bins)
+ {
+ console.log("failed to init axis with min, max, bins");
+
return;
+ }
this._axis_min = min;
this._axis_max = max;
@@ -650,6 +652,8 @@ var AxisView = new Class(
}
context.fillText(this.label(), rect.maxX(), label_y);
+
+ context = null;
},
drawTick: function(rect)
@@ -746,6 +750,8 @@ var AxisView = new Class(
context.stroke();
}
}
+
+ context = null;
},
drawTickLabel: function(label, point, align)
@@ -800,6 +806,8 @@ var AxisView = new Class(
context.fillText(label, 0, 0);
context.restore();
+
+ context = null;
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.