vendor/assets/javascripts/jqplot-plugins/jqplot.highlighter.js in outfielding-jqplot-rails-1.0.7 vs vendor/assets/javascripts/jqplot-plugins/jqplot.highlighter.js in outfielding-jqplot-rails-1.0.8

- old
+ new

@@ -1,11 +1,11 @@ /** * jqPlot * Pure JavaScript plotting plugin using jQuery * - * Version: 1.0.7 - * Revision: 1224 + * Version: 1.0.8 + * Revision: 1250 * * 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 @@ -337,16 +337,16 @@ var ms = 0; var fact = 0.707; if (series.markerRenderer.show == true) { ms = (series.markerRenderer.size + opts.sizeAdjust)/2; } - - var loc = locations; - if (series.fillToZero && series.fill && neighbor.data[1] < 0) { - loc = oppositeLocations; - } - + + var loc = locations; + if (series.fillToZero && series.fill && neighbor.data[1] < 0) { + loc = oppositeLocations; + } + switch (loc[locationIndicies[opts.tooltipLocation]]) { case 'nw': var x = gridpos.x + plot._gridPadding.left - elem.outerWidth(true) - opts.tooltipOffset - fact * ms; var y = gridpos.y + plot._gridPadding.top - opts.tooltipOffset - elem.outerHeight(true) - fact * ms; break; @@ -430,11 +430,11 @@ hl.isHighlighting = true; hl.currentNeighbor = neighbor; if (hl.showMarker) { draw(plot, neighbor); } - if (hl.showTooltip && (!c || !c._zoom.started)) { + if (plot.series[neighbor.seriesIndex].show && hl.showTooltip && (!c || !c._zoom.started)) { showTooltip(plot, plot.series[neighbor.seriesIndex], neighbor); } if (hl.bringSeriesToFront) { plot.moveSeriesToFront(neighbor.seriesIndex); } @@ -450,10 +450,10 @@ hl.isHighlighting = true; hl.currentNeighbor = neighbor; if (hl.showMarker) { draw(plot, neighbor); } - if (hl.showTooltip && (!c || !c._zoom.started)) { + if (plot.series[neighbor.seriesIndex].show && hl.showTooltip && (!c || !c._zoom.started)) { showTooltip(plot, plot.series[neighbor.seriesIndex], neighbor); } if (hl.bringSeriesToFront) { plot.moveSeriesToFront(neighbor.seriesIndex); } \ No newline at end of file