vendor/assets/javascripts/jqplot-plugins/jqplot.canvasAxisTickRenderer.js in outfielding-jqplot-rails-1.0.5 vs vendor/assets/javascripts/jqplot-plugins/jqplot.canvasAxisTickRenderer.js in outfielding-jqplot-rails-1.0.7

- old
+ new

@@ -1,11 +1,11 @@ /** * jqPlot * Pure JavaScript plotting plugin using jQuery * - * Version: 1.0.5 - * Revision: 1122+ + * Version: 1.0.7 + * Revision: 1224 * * Copyright (c) 2009-2013 Chris Leonello * jqPlot is currently available for use in all personal or commercial projects * under both the MIT (http://www.opensource.org/licenses/mit-license.php) and GPL * version 2.0 (http://www.gnu.org/licenses/gpl-2.0.html) licenses. This means that you can @@ -47,14 +47,14 @@ // prop: mark // tick mark on the axis. One of 'inside', 'outside', 'cross', '' or null. this.mark = 'outside'; // prop: showMark - // wether or not to show the mark on the axis. + // whether or not to show the mark on the axis. this.showMark = true; // prop: showGridline - // wether or not to draw the gridline on the grid at this tick. + // whether or not to draw the gridline on the grid at this tick. this.showGridline = true; // prop: isMinorTick // if this is a minor tick. this.isMinorTick = false; // prop: angle @@ -63,14 +63,14 @@ // prop: markSize // Length of the tick marks in pixels. For 'cross' style, length // will be stoked above and below axis, so total length will be twice this. this.markSize = 4; // prop: show - // wether or not to show the tick (mark and label). + // whether or not to show the tick (mark and label). this.show = true; // prop: showLabel - // wether or not to show the label. + // whether or not to show the label. this.showLabel = true; // prop: labelPosition // 'auto', 'start', 'middle' or 'end'. // Whether tick label should be positioned so the start, middle, or end // of the tick mark. @@ -176,9 +176,19 @@ var tr = this._textRenderer; var l = tr.getWidth(ctx); var h = tr.getHeight(ctx); var w = Math.abs(Math.cos(tr.angle)*h) + Math.abs(Math.sin(tr.angle)*l); return w; + } + }; + + // return top. + $.jqplot.CanvasAxisTickRenderer.prototype.getTop = function(ctx) { + if (this._elem) { + return this._elem.position().top; + } + else { + return null; } }; $.jqplot.CanvasAxisTickRenderer.prototype.getAngleRad = function() { var a = this.angle * Math.PI/180; \ No newline at end of file