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)
committerAdam Vartanian <flooey@gmail.com>
Tue, 14 Oct 2014 20:24:42 +0000 (16:24 -0400)
commit8b7f76510963609a37605442de2db6ce961c72f7
treedfd395ad2fa6789b3badcd37e77bad94d1f43de2
parentad7785b8f9a1564b8d18a8ee9a1036936298bb31
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