X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=b81789b198c2056ef908b2aca253495aa5efcfce;hb=3bdeeb9b9d123e9e45159a6801b6e7fe74f08690;hp=9d58201aa296de324447f3c26f23b36de69e3134;hpb=cc825c7b029920a3753109cc990bedffb2c8f8f0;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index 9d58201..b81789b 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1771,7 +1771,7 @@ Dygraph.prototype.mouseMove_ = function(event) { var highlightSeriesOpts = this.attr_("highlightSeriesOpts"); var selectionChanged = false; - if (highlightSeriesOpts && !this.lockedSet_) { + if (highlightSeriesOpts && !this.isSeriesLocked()) { var closest; if (this.attr_("stackedGraph")) { closest = this.findStackedPoint(canvasx, canvasy); @@ -2064,6 +2064,14 @@ Dygraph.prototype.getHighlightSeries = function() { }; /** + * Returns true if the currently-highlighted series was locked + * via setSelection(..., seriesName, true). + */ +Dygraph.prototype.isSeriesLocked = function() { + return this.lockedSet_; +}; + +/** * Fires when there's data available to be graphed. * @param {String} data Raw CSV data to be plotted * @private