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,6 +107,8 @@ class Hypothesis extends Annotator ...@@ -107,6 +107,8 @@ class Hypothesis extends Annotator
entities.push href entities.push href
this.plugins.Store?.loadAnnotations() this.plugins.Store?.loadAnnotations()
# Allow the host to define it's own state
unless source is $window.parent
channel.notify channel.notify
method: 'setTool' method: 'setTool'
params: this.tool params: this.tool
......
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