Commit 9aac31c2 authored by Randall Leeds's avatar Randall Leeds

Merge pull request #1752 from hypothesis/consistent-rpc-names

Rename rpc methods to be more consistent
parents 29b4075f eea3b762
...@@ -230,17 +230,17 @@ class Annotator.Guest extends Annotator ...@@ -230,17 +230,17 @@ class Annotator.Guest extends Annotator
showAnnotations: (annotations) => showAnnotations: (annotations) =>
@panel?.notify @panel?.notify
method: "showViewer" method: "showAnnotations"
params: (a.$$tag for a in annotations) params: (a.$$tag for a in annotations)
toggleAnnotationSelection: (annotations) => toggleAnnotationSelection: (annotations) =>
@panel?.notify @panel?.notify
method: "toggleViewerSelection" method: "toggleAnnotationSelection"
params: (a.$$tag for a in annotations) params: (a.$$tag for a in annotations)
updateAnnotations: (annotations) => updateAnnotations: (annotations) =>
@panel?.notify @panel?.notify
method: "updateViewer" method: "updateAnnotations"
params: (a.$$tag for a in annotations) params: (a.$$tag for a in annotations)
showEditor: (annotation) => showEditor: (annotation) =>
......
...@@ -154,12 +154,12 @@ class Hypothesis extends Annotator ...@@ -154,12 +154,12 @@ class Hypothesis extends Annotator
this.showEditor this._getLocalAnnotation(tag) this.showEditor this._getLocalAnnotation(tag)
) )
.bind('showViewer', (ctx, tags=[]) => .bind('showAnnotations', (ctx, tags=[]) =>
@element.scope().$apply => @element.scope().$apply =>
this.showViewer this._getLocalAnnotations(tags) this.showViewer this._getLocalAnnotations(tags)
) )
.bind('updateViewer', (ctx, tags=[]) => .bind('updateAnnotations', (ctx, tags=[]) =>
@element.scope().$apply => @element.scope().$apply =>
this.updateViewer this._getLocalAnnotations(tags) this.updateViewer this._getLocalAnnotations(tags)
) )
...@@ -169,7 +169,7 @@ class Hypothesis extends Annotator ...@@ -169,7 +169,7 @@ class Hypothesis extends Annotator
this.focusAnnotations tags this.focusAnnotations tags
) )
.bind('toggleViewerSelection', (ctx, tags=[]) => .bind('toggleAnnotationSelection', (ctx, tags=[]) =>
@element.scope().$apply => @element.scope().$apply =>
this.toggleViewerSelection this._getLocalAnnotations(tags) this.toggleViewerSelection this._getLocalAnnotations(tags)
) )
......
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