danvk/dygraphs — pull request #159 by klausw-g (2012-07-27 23:40:07+00:00)
Title: Add optional "locked" arg to setSelection;  Don't clear overlay on mouseup if not zooming.

commit b9a3ece4ac8aeb31265823266ec359ad52ac2db0
Author: Klaus Weidner
Date: Fri Jul 27 16:02:07 2012 -0700

Add optional "locked" arg to setSelection

Locking a series selection temporarily disables the closest-series
logic of the highlighting code, switching it to traditional by-row
selection until unlocked by clearSelection().

This is useful for following values of a single series on mouseover,
see the example use in the "Highlight Closest Series" demo which
toggles this by clicking the graph.

commit 214083b469aec7f51223ec5c1532924d75c6eb2f
Author: Klaus Weidner
Date: Fri Jul 27 15:53:06 2012 -0700

Don't clear overlay on mouseup if not zooming.

On endZoom, check if moveZoom was called since the last startZoom. If
not, leave the overlay canvas alone, there's no zoom rectangle to erase.

The default mouseup action unconditionally cleared the overlay canvas,
this destroyed other things that may have been drawn there such as
highlighted series, causing glitches for clickCallback use.