Commit 26de2224 authored by csillag's avatar csillag

Consistent names for focusing on annotations

parent c94a438f
......@@ -305,7 +305,7 @@ class AnnotationViewerController
# Provide no-ops until these methods are moved elsewere. They only apply
# to annotations loaded into the stream.
$scope.activate = angular.noop
$scope.focus = angular.noop
$scope.shouldShowThread = -> true
......@@ -335,14 +335,14 @@ class ViewerController
$scope.isEmbedded = true
$scope.isStream = true
$scope.activate = (annotation) ->
$scope.focus = (annotation) ->
if angular.isObject annotation
highlights = [annotation.$$tag]
else
highlights = []
for p in annotator.providers
p.channel.notify
method: 'setActiveHighlights'
method: 'setFocusedHighlights'
params: highlights
$scope.scrollTo = (annotation) ->
......
......@@ -143,7 +143,7 @@ class Annotator.Guest extends Annotator
if value then @plugins.Heatmap._update()
)
.bind('setActiveHighlights', (ctx, tags=[]) =>
.bind('setFocusedHighlights', (ctx, tags=[]) =>
for hl in @getHighlights()
if hl.annotation.$$tag in tags
hl.setActive true, true
......
......@@ -38,9 +38,9 @@
thread="child" thread-filter
thread-collapsed="!search.query"
ng-include="'thread.html'"
ng-mouseenter="activate(child.message)"
ng-mouseenter="focus(child.message)"
ng-click="scrollTo(child.message)""
ng-mouseleave="activate()"
ng-mouseleave="focus()"
ng-repeat="child in vm.container.children | orderBy : sort.predicate"
ng-show="vm.container && shouldShowThread(child) &&
(count('edit') || count('match') || !threadFilter.active())">
......
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