Commit ba5f3375 authored by Aron Carroll's avatar Aron Carroll Committed by Nick Stenning

Show highlights when showHighlights option is provided

parent bb9007aa
......@@ -37,6 +37,11 @@ class Annotator.Host extends Annotator.Guest
if options.firstRun
this.on 'panelReady', => this.actuallyShowFrame(transition: false)
# Host frame dictates the toolbar options.
this.on 'panelReady', =>
this.setTool('comment')
this.setVisibleHighlights(!!options.showHighlights)
if @plugins.Heatmap?
this._setupDragEvents()
@plugins.Heatmap.element.on 'click', (event) =>
......
......@@ -107,13 +107,15 @@ class Hypothesis extends Annotator
entities.push href
this.plugins.Store?.loadAnnotations()
channel.notify
method: 'setTool'
params: this.tool
channel.notify
method: 'setVisibleHighlights'
params: this.visibleHighlights
# Allow the host to define it's own state
unless source is $window.parent
channel.notify
method: 'setTool'
params: this.tool
channel.notify
method: 'setVisibleHighlights'
params: this.visibleHighlights
@providers.push
channel: channel
......
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