diff options
author | zsloan | 2016-06-20 11:03:20 -0500 |
---|---|---|
committer | GitHub | 2016-06-20 11:03:20 -0500 |
commit | 8222ef16d443dc41db9d7e09b1af400d8d866854 (patch) | |
tree | e4f5b49aa21c32aa2b770b1a65c8fef7782b625f /wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js | |
parent | d90dc3748557d1d6fbaa59f71fe676b8a7c393ca (diff) | |
parent | 10df36b60273d81678f6630c07a2d8e5a6409282 (diff) | |
download | genenetwork2-8222ef16d443dc41db9d7e09b1af400d8d866854.tar.gz |
Merge pull request #168 from genenetwork/staging
Staging
Diffstat (limited to 'wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js')
-rwxr-xr-x | wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js index 03766206..bc72bc5a 100755 --- a/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js +++ b/wqflask/wqflask/static/packages/jqplot/plugins/jqplot.canvasOverlay.js @@ -6,13 +6,13 @@ * Revision: 1121 * * Copyright (c) 2009-2012 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 - * choose the license that best suits your project and use it accordingly. + * 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 + * choose the license that best suits your project and use it accordingly. * - * Although not required, the author would appreciate an email letting him - * know of any substantial use of jqPlot. You can reach the author at: + * Although not required, the author would appreciate an email letting him + * know of any substantial use of jqPlot. You can reach the author at: * chris at jqplot dot com or see http://www.jqplot.com/info.php . * * If you are feeling kind and generous, consider supporting the project by @@ -26,7 +26,7 @@ * http://hexmen.com/js/sprintf.js * The author (Ash Searle) has placed this code in the public domain: * "This code is unrestricted: you are free to use it however you like." - * + * */ (function($) { var objCounter = 0; @@ -69,17 +69,17 @@ default: break; } - } + } } } $.extend(true, this.options, options); }; - + // called with scope of a plot object $.jqplot.CanvasOverlay.postPlotInit = function (target, data, opts) { var options = opts || {}; // add a canvasOverlay attribute to the plot - this.plugins.canvasOverlay = new $.jqplot.CanvasOverlay(options.canvasOverlay); + this.plugins.canvasOverlay = new $.jqplot.CanvasOverlay(options.canvasOverlay); }; @@ -89,7 +89,7 @@ this.gridStart = null; this.gridStop = null; this.tooltipWidthFactor = 0; - this.options = { + this.options = { // prop: name // Optional name for the overlay object. // Can be later used to retrieve the object by name. @@ -198,7 +198,7 @@ // x value for the end of the line, null to scale to axis max. xmax: null, // prop xOffset - // offset ends of the line inside the grid. Number + // offset ends of the line inside the grid. Number xOffset: '6px', // number or string. Number interpreted as units, string as pixels. xminOffset: null, xmaxOffset: null @@ -212,7 +212,7 @@ HorizontalLine.prototype = new LineBase(); HorizontalLine.prototype.constructor = HorizontalLine; - + /** * Class: DashedHorizontalLine @@ -243,7 +243,7 @@ DashedHorizontalLine.prototype = new LineBase(); DashedHorizontalLine.prototype.constructor = DashedHorizontalLine; - + /** * Class: VerticalLine @@ -269,7 +269,7 @@ VerticalLine.prototype = new LineBase(); VerticalLine.prototype.constructor = VerticalLine; - + /** * Class: DashedVerticalLine @@ -302,42 +302,42 @@ DashedVerticalLine.prototype = new LineBase(); DashedVerticalLine.prototype.constructor = DashedVerticalLine; - + $.jqplot.CanvasOverlay.prototype.addLine = function(opts) { var line = new Line(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.addHorizontalLine = function(opts) { var line = new HorizontalLine(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.addDashedHorizontalLine = function(opts) { var line = new DashedHorizontalLine(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.addVerticalLine = function(opts) { var line = new VerticalLine(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.addDashedVerticalLine = function(opts) { var line = new DashedVerticalLine(opts); line.uid = objCounter++; this.objects.push(line); this.objectNames.push(line.options.name); }; - + $.jqplot.CanvasOverlay.prototype.removeObject = function(idx) { // check if integer, remove by index if ($.type(idx) == 'number') { @@ -353,7 +353,7 @@ } } }; - + $.jqplot.CanvasOverlay.prototype.getObject = function(idx) { // check if integer, remove by index if ($.type(idx) == 'number') { @@ -367,16 +367,16 @@ } } }; - + // Set get as alias for getObject. $.jqplot.CanvasOverlay.prototype.get = $.jqplot.CanvasOverlay.prototype.getObject; - + $.jqplot.CanvasOverlay.prototype.clear = function(plot) { this.canvas._ctx.clearRect(0,0,this.canvas.getWidth(), this.canvas.getHeight()); }; - + $.jqplot.CanvasOverlay.prototype.draw = function(plot) { - var obj, + var obj, objs = this.objects, mr = this.markerRenderer, start, @@ -404,7 +404,7 @@ mr.draw(start, stop, this.canvas._ctx, opts); break; case 'horizontalLine': - + // style and shadow properties should be set before // every draw of marker renderer. if (obj.options.y != null) { @@ -447,7 +447,7 @@ break; case 'dashedHorizontalLine': - + var dashPat = obj.options.dashPattern; var dashPatLen = 0; for (var i=0; i<dashPat.length; i++) { @@ -507,7 +507,7 @@ break; case 'verticalLine': - + // style and shadow properties should be set before // every draw of marker renderer. if (obj.options.x != null) { @@ -550,7 +550,7 @@ break; case 'dashedVerticalLine': - + var dashPat = obj.options.dashPattern; var dashPatLen = 0; for (var i=0; i<dashPat.length; i++) { @@ -629,19 +629,19 @@ } } }; - + // called within context of plot // create a canvas which we can draw on. // insert it before the eventCanvas, so eventCanvas will still capture events. $.jqplot.CanvasOverlay.postPlotDraw = function() { var co = this.plugins.canvasOverlay; - // Memory Leaks patch + // Memory Leaks patch if (co && co.highlightCanvas) { co.highlightCanvas.resetCanvas(); co.highlightCanvas = null; } co.canvas = new $.jqplot.GenericCanvas(); - + this.eventCanvas._elem.before(co.canvas.createElement(this._gridPadding, 'jqplot-overlayCanvas-canvas', this._plotDimensions, this)); co.canvas.setContext(); if (!co.deferDraw) { @@ -653,7 +653,7 @@ elem = null; co._tooltipElem.addClass('jqplot-canvasOverlay-tooltip'); co._tooltipElem.css({position:'absolute', display:'none'}); - + this.eventCanvas._elem.before(co._tooltipElem); this.eventCanvas._elem.bind('mouseleave', { elem: co._tooltipElem }, function (ev) { ev.data.elem.hide(); }); @@ -668,7 +668,7 @@ var opts = obj.options, x, y; elem.html($.jqplot.sprintf(opts.tooltipFormatString, datapos[0], datapos[1])); - + switch (opts.tooltipLocation) { case 'nw': x = gridpos[0] + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset; @@ -777,7 +777,7 @@ break; default: break; - } + } co.highlightObjectIndex = i; haveHighlight = true; break; @@ -857,7 +857,7 @@ co.highlightObjectIndex = null; } } - + $.jqplot.postInitHooks.push($.jqplot.CanvasOverlay.postPlotInit); $.jqplot.postDrawHooks.push($.jqplot.CanvasOverlay.postPlotDraw); $.jqplot.eventListenerHooks.push(['jqplotMouseMove', handleMove]); |