Commit e1134b97 authored by Randall Leeds's avatar Randall Leeds

Be strict about up/down arrow offscreen counts

It is potentially confusing if, upon reaching the start or end of
highlights, the navigational buckets don't seem to do anything. At this
point, the first or last highlights are visible but the buckets seem to
indicate that the highlights are still off screen.

Change the buckets to mantain a count of the annotations that are
strictly off screen.
parent b3e953d9
...@@ -184,9 +184,9 @@ class Annotator.Plugin.BucketBar extends Annotator.Plugin ...@@ -184,9 +184,9 @@ class Annotator.Plugin.BucketBar extends Annotator.Plugin
x = hl.getTop() - defaultView.pageYOffset x = hl.getTop() - defaultView.pageYOffset
h = hl.getHeight() h = hl.getHeight()
if x <= @BUCKET_SIZE + @BUCKET_THRESHOLD_PAD if x < 0
if d not in above then above.push d if d not in above then above.push d
else if x + h >= $(window).height() - @BUCKET_SIZE else if x + h > window.innerHeight
if d not in below then below.push d if d not in below then below.push d
else else
points.push [x, 1, d] points.push [x, 1, d]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment