From: Dan Vanderkam Date: Wed, 29 Feb 2012 17:38:12 +0000 (-0800) Subject: Merge pull request #133 from klausw-g/fix-stuck-highlighting X-Git-Tag: v1.0.0~314^2~3 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=d3f09b974d7027a334259e604944d0777007243d;hp=470d42e152bd816333bb9879731c77340daaf7c1;p=dygraphs.git Merge pull request #133 from klausw-g/fix-stuck-highlighting Fix stuck fading animation for series highlighting --- diff --git a/dygraph.js b/dygraph.js index bc830b2..d79fa88 100644 --- a/dygraph.js +++ b/dygraph.js @@ -1851,10 +1851,8 @@ Dygraph.prototype.setLegendHTML_ = function(x, sel_points) { Dygraph.prototype.animateSelection_ = function(direction) { var totalSteps = 10; var millis = 30; - if (this.fadeLevel === undefined) { - this.fadeLevel = 0; - this.animateId = 0; - } + if (this.fadeLevel === undefined) this.fadeLevel = 0; + if (this.animateId === undefined) this.animateId = 0; var start = this.fadeLevel; var steps = direction < 0 ? start : totalSteps - start; if (steps <= 0) {