Commit c791dc80 authored by csillag's avatar csillag

On heatmap click, change the view to viewer. Fixes #1140.

parent ac4d8e98
......@@ -68,7 +68,7 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
@element.on 'click', (event) =>
event.stopPropagation()
this._fillDynamicBucket()
this._fillDynamicBucket true
@dynamicBucket = true
@element.on 'mouseup', (event) =>
......@@ -496,7 +496,7 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
@tabs = tabs
_fillDynamicBucket: =>
_fillDynamicBucket: (changeLocation = false) =>
top = window.pageYOffset
bottom = top + $(window).innerHeight()
anchors = @annotator.getHighlights()
......@@ -507,7 +507,10 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
acc
, []
# $.merge visible, @annotator.comments
@annotator.updateViewer "Screen", visible
if changeLocation
@annotator.showViewer "Screen", visible
else
@annotator.updateViewer "Screen", visible
_getCommentBucket: => @index.length - 2
......
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