Commit cf4c8914 authored by Aron Carroll's avatar Aron Carroll

Rename @panel to @bridge in Guest

This avoids the confusion of having a property called panel that
refers to an instance of Bridge.
parent 630d4807
...@@ -83,7 +83,7 @@ class Annotator.Guest extends Annotator ...@@ -83,7 +83,7 @@ class Annotator.Guest extends Annotator
formatted formatted
this.addPlugin('Bridge', bridgePluginOptions) this.addPlugin('Bridge', bridgePluginOptions)
@panel = this._connectAnnotationUISync(this.plugins.Bridge) @bridge = this._connectAnnotationUISync(this.plugins.Bridge)
# Load plugins # Load plugins
for own name, opts of @options for own name, opts of @options
...@@ -240,27 +240,27 @@ class Annotator.Guest extends Annotator ...@@ -240,27 +240,27 @@ class Annotator.Guest extends Annotator
annotation annotation
showAnnotations: (annotations) => showAnnotations: (annotations) =>
@panel?.notify @bridge?.notify
method: "showAnnotations" method: "showAnnotations"
params: (a.$$tag for a in annotations) params: (a.$$tag for a in annotations)
toggleAnnotationSelection: (annotations) => toggleAnnotationSelection: (annotations) =>
@panel?.notify @bridge?.notify
method: "toggleAnnotationSelection" method: "toggleAnnotationSelection"
params: (a.$$tag for a in annotations) params: (a.$$tag for a in annotations)
updateAnnotations: (annotations) => updateAnnotations: (annotations) =>
@panel?.notify @bridge?.notify
method: "updateAnnotations" method: "updateAnnotations"
params: (a.$$tag for a in annotations) params: (a.$$tag for a in annotations)
showEditor: (annotation) => showEditor: (annotation) =>
@panel?.notify @bridge?.notify
method: "showEditor" method: "showEditor"
params: annotation.$$tag params: annotation.$$tag
focusAnnotations: (annotations) => focusAnnotations: (annotations) =>
@panel?.notify @bridge?.notify
method: "focusAnnotations" method: "focusAnnotations"
params: (a.$$tag for a in annotations) params: (a.$$tag for a in annotations)
...@@ -355,7 +355,7 @@ class Annotator.Guest extends Annotator ...@@ -355,7 +355,7 @@ class Annotator.Guest extends Annotator
(event.metaKey or event.ctrlKey) (event.metaKey or event.ctrlKey)
setTool: (name) -> setTool: (name) ->
@panel?.notify @bridge?.notify
method: 'setTool' method: 'setTool'
params: name params: name
...@@ -363,7 +363,7 @@ class Annotator.Guest extends Annotator ...@@ -363,7 +363,7 @@ class Annotator.Guest extends Annotator
setVisibleHighlights: (shouldShowHighlights) -> setVisibleHighlights: (shouldShowHighlights) ->
return if @visibleHighlights == shouldShowHighlights return if @visibleHighlights == shouldShowHighlights
@panel?.notify @bridge?.notify
method: 'setVisibleHighlights' method: 'setVisibleHighlights'
params: shouldShowHighlights params: shouldShowHighlights
...@@ -382,11 +382,11 @@ class Annotator.Guest extends Annotator ...@@ -382,11 +382,11 @@ class Annotator.Guest extends Annotator
# Open the sidebar # Open the sidebar
showFrame: -> showFrame: ->
@panel?.notify method: 'open' @bridge?.notify method: 'open'
# Close the sidebar # Close the sidebar
hideFrame: -> hideFrame: ->
@panel?.notify method: 'back' @bridge?.notify method: 'back'
addToken: (token) => addToken: (token) =>
@api.notify @api.notify
......
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