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