X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=1012d76c3c9e79af05af5cf1ab4c4383cb854ba4;hb=85abed306e1853a404892004d235249e4af4ddd2;hp=26a3812b9a9ac071ada4d98ba88a55534e8d5460;hpb=31eddad373355fb39fa948b65f9ba29e3f594e61;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index 26a3812..1012d76 100644 --- a/dygraph.js +++ b/dygraph.js @@ -928,10 +928,9 @@ Dygraph.prototype.mouseMove_ = function(event) { } if (this.attr_("highlightCallback")) { - var px = this.lastHighlightCallbackX; + var px = this.lastx_; if (px !== null && lastx != px) { // only fire if the selected point has changed. - this.lastHighlightCallbackX = lastx; this.attr_("highlightCallback")(event, lastx, this.selPoints_); } } @@ -1040,6 +1039,10 @@ Dygraph.prototype.setSelection = function(row) { * @private */ Dygraph.prototype.mouseOut_ = function(event) { + if (this.attr_("unhighlightCallback")) { + this.attr_("unhighlightCallback")(event); + } + if (this.attr_("hideOverlayOnMouseOut")) { this.clearSelection(); }