Commit 01c75593 authored by Randall Leeds's avatar Randall Leeds

s/trigger(Show|Hide)Frame/(show|hide)Frame/

There's no reason to have these methods have a different name in the
guest as the host. The implementation should be opaque.
parent 6370ed9f
......@@ -136,7 +136,7 @@ module.exports = class Guest extends Annotator
@wrapper = @element
.on 'click', (event) =>
if !@selectedTargets?.length
@triggerHideFrame()
this.hideFrame()
this
# These methods aren't used in the iframe-hosted configuration of Annotator.
......@@ -359,7 +359,7 @@ module.exports = class Guest extends Annotator
@selectedRanges = []
selectAnnotations: (annotations, toggle) =>
this.triggerShowFrame()
this.showFrame()
if toggle
this.toggleAnnotationSelection annotations
else
......@@ -412,11 +412,11 @@ module.exports = class Guest extends Annotator
@visibleHighlights = shouldShowHighlights
# Open the sidebar
triggerShowFrame: ->
showFrame: ->
@crossframe?.notify method: 'open'
# Close the sidebar
triggerHideFrame: ->
hideFrame: ->
@crossframe?.notify method: 'back'
onAdderMouseup: (event) ->
......@@ -435,5 +435,5 @@ module.exports = class Guest extends Annotator
this.createHighlight()
when 'comment'
this.createAnnotation()
this.triggerShowFrame()
this.showFrame()
Annotator.Util.getGlobal().getSelection().removeAllRanges()
......@@ -35,9 +35,9 @@ class Annotator.Plugin.Toolbar extends Annotator.Plugin
event.stopPropagation()
collapsed = @annotator.frame.hasClass('annotator-collapsed')
if collapsed
@annotator.triggerShowFrame()
@annotator.showFrame()
else
@annotator.triggerHideFrame()
@annotator.hideFrame()
,
"title": "Hide Highlights"
"class": "h-icon-visibility"
......
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