Commit 29b4075f authored by gergely-ujvari's avatar gergely-ujvari

Merge pull request #1750 from hypothesis/more-consistent-names

Renamed a few methods to be more consistent
parents 4891c90b ef706f43
......@@ -344,7 +344,7 @@ class ViewerController
if angular.isObject annotation
for p in annotator.providers
p.channel.notify
method: 'scrollTo'
method: 'scrollToAnnotation'
params: annotation.$$tag
$scope.shouldShowThread = (container) ->
......
......@@ -151,7 +151,7 @@ class Annotator.Guest extends Annotator
hl.setFocused false
)
.bind('scrollTo', (ctx, tag) =>
.bind('scrollToAnnotation', (ctx, tag) =>
for hl in @getHighlights()
if hl.annotation.$$tag is tag
hl.scrollTo()
......@@ -228,17 +228,17 @@ class Annotator.Guest extends Annotator
this.plugins.Bridge.sync([annotation])
annotation
showViewer: (annotations) =>
showAnnotations: (annotations) =>
@panel?.notify
method: "showViewer"
params: (a.$$tag for a in annotations)
toggleViewerSelection: (annotations) =>
toggleAnnotationSelection: (annotations) =>
@panel?.notify
method: "toggleViewerSelection"
params: (a.$$tag for a in annotations)
updateViewer: (annotations) =>
updateAnnotations: (annotations) =>
@panel?.notify
method: "updateViewer"
params: (a.$$tag for a in annotations)
......@@ -290,10 +290,10 @@ class Annotator.Guest extends Annotator
if toggle
# Tell sidebar to add these annotations to the sidebar
this.toggleViewerSelection annotations
this.toggleAnnotationSelection annotations
else
# Tell sidebar to show the viewer for these annotations
this.showViewer annotations
this.showAnnotations annotations
# When hovering on a highlight in highlighting mode,
# tell the sidebar to hilite the relevant annotations
......
......@@ -351,7 +351,7 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
this._buildTabs(@tabs, @buckets)
if @dynamicBucket
@annotator.updateViewer this._getDynamicBucket()
@annotator.updateAnnotations this._getDynamicBucket()
_buildTabs: ->
@tabs.each (d, el) =>
......@@ -395,4 +395,4 @@ class Annotator.Plugin.Heatmap extends Annotator.Plugin
# Simulate clicking on the comments tab
commentClick: =>
@dynamicBucket = false
annotator.showViewer @buckets[@_getCommentBucket()]
annotator.showAnnotations @buckets[@_getCommentBucket()]
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