Add a fast-path setSelection() if the points are in the expected place.
authorAdam Vartanian <flooey@gmail.com>
Tue, 14 Oct 2014 20:24:42 +0000 (16:24 -0400)
committerDan Vanderkam <danvdk@gmail.com>
Wed, 22 Oct 2014 02:31:06 +0000 (22:31 -0400)
commitad03bf36da1549e33d0908d132c84cbb411598f5
treed6248cc104eb34d29ba26304f1cdc5b1f2833109
parent9b7f997297a8c8becb3359186f39afbdbb1f88bc
Add a fast-path setSelection() if the points are in the expected place.

In most cases, the appropriate index will contain the point that should
be selected, so check that and use that point if so.  Otherwise, search
for a matching point.

Also add a test that tests the case where the appropriate index doesn't
contain the point we're looking for.
auto_tests/tests/selection.js
dygraph.js