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