Commit 930a68cf authored by Randall Leeds's avatar Randall Leeds

Fix heatmap tab positioning on offset documents

Since the highlight code uses jQuery's .offset() we don't need to
factor in the wrapper offset.

Close #931
parent a5a6f616
...@@ -258,7 +258,7 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin ...@@ -258,7 +258,7 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
# Construct control points for the heatmap # Construct control points for the heatmap
points = highlights.reduce (points, hl, i) => points = highlights.reduce (points, hl, i) =>
d = hl.annotation d = hl.annotation
x = hl.getTop() - wrapper.offset().top - defaultView.pageYOffset x = hl.getTop() - defaultView.pageYOffset
h = hl.getHeight() h = hl.getHeight()
if x <= @BUCKET_SIZE + @BUCKET_THRESHOLD_PAD if x <= @BUCKET_SIZE + @BUCKET_THRESHOLD_PAD
......
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